qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Patch: virtual vfat support


From: Magnus Damm
Subject: Re: [Qemu-devel] Patch: virtual vfat support
Date: Sun, 19 Dec 2004 20:32:30 +0100

Hello,

Great idea, really cool! Now if someone could add USB support and we
could hook up your code as an virtual USB storage device, then
hotplugging could then be used to update the state of the
filesystem...

/ magnus

On Sun, 19 Dec 2004 19:15:18 +0100 (CET), Johannes Schindelin
<address@hidden> wrote:
> Hi,
> 
> I proudly present the alpha version of my vvfat block driver:
> 
> http://libvncserver.sf.net/qemu/qemu-vvfat.patch.gz
> 
> So what is it? By calling QEmu with "-hda vvfat:some/directory", you can
> access the files in that directory via an emulated (virtual) VFAT device.
> (Yes, from the guest OS you can read the files and subdirectories of one
> of the host OS' directories, and yes, this should eventually solve the SMB
> on DOS problem).
> 
> Warning: this is the first alpha version (read only). 2nd warning: If you
> access the files from within QEmu and change the contents from without,
> you're likely to get corrupt data inside QEmu.
> 
> How it works: It fakes an mbr, as well as one partition with boot sector
> FAT and directory. The rest of that partition is transparently mapped to
> the files in the local directory. I used a fixed big size of this virtual
> hard drive, because as it is all fake, space is cheap...
> 
> When the directory is built, the block driver recurses into the given
> directory, and "stores" them just after the 2nd FAT. After that, the FAT
> is built, "storing" all files subsequently at the first "free" clusters.
> 
> Why VFAT? Because almost every OS has support for it, at least now that
> every digital camera and USB stick and maybe even your washing machine is
> using it. And chances are good that Microschrott cannot patent it, much as
> it may try.
> 
> It works with a Linux guest. I tried with FreeDOS, but it's not able to
> access the hard disk. Why doesn't it work with FreeDOS? No idea. This is
> my priority for now. Although, if you want to help, you're so welcome.
> 
> After that, I will try to add write support. This will be a little bit of
> guess work, as QEmu cannot be completely sure in which order the
> transaction (write new sector, write FAT, write directory entry) will
> happen. Maybe it's possible to trigger the update whenever the last of
> those three actions happened. I don't know. I am tired.
> 
> Ciao,
> Dscho
> 
> _______________________________________________
> Qemu-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]