This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: loopback device
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 25 Jun 2007 15:39:19 -0700
- Subject: Re: loopback device
- References: <46803B91.9060309@yahoo.ca>
jburke wrote:
> Would it be feasible to add a loopback device to the cygwin dll? I've
> managed to have partition magic and another program called vmware to see
> a dd'd disk image after mounting that disk image with vdk.
> (http://chitchat.at.infoseek.co.jp/vmware/vdk.html#download) I'll look
> at what's possible, and would hope i can get some direction.. it might
> be helpful for me to say that vdk's source code is also freely
> available.. finally subscribed and hope i don't get bogged down for the
> wrong place.. cheers! :)
It sounds like you're trying to get Cygwin to mount a file image as a
filesystem. That's not possible, as Cygwin is just a user-space
library. It does not implement any filesystem drivers, nor could it,
since that generally requires a kernel driver. All that Cygwin's mount
table does is provide a list of mappings of win32 paths to POSIX paths,
a glorified string search and replace, c:\cygwin\bin equals /usr/bin,
etc. That's it, we have no control over the actual underlying
filesystems.
So I'm not really sure what you're hoping for here. There are already
programs for Windows that let you do this kind of thing (e.g. Daemon
Tools, Alcohol 120%), and they are all implemented as kernel-mode
drivers. And so is this vdk utility, apparently.
"loopback" is a red herring here because it makes it sound as if all
that's required is taking the output of something and hooking into the
input of another thing ... and that's exactly what happens *inside the
kernel* when you mount an image as a filesystem. But again, that's all
at a much lower level than where Cygwin operates. Just because Cygwin's
mount command and a POSIX mount command share the same name and similar
general syntax doesn't mean they are at all similar underneath.
Brian