qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch: virtual vfat support
@ 2004-12-19 18:15 Johannes Schindelin
  2004-12-19 19:32 ` Magnus Damm
  2004-12-20  8:32 ` zitu
  0 siblings, 2 replies; 16+ messages in thread
From: Johannes Schindelin @ 2004-12-19 18:15 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-12-23 18:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.58.0412202329290.8198@wgmdd8.biozentrum.uni-wuerzburg.de>
2004-12-21 22:47 ` [Qemu-devel] Patch: virtual vfat support Andreas Bollhalder
2004-12-22 18:55   ` Johannes Schindelin
2004-12-23  1:02     ` André Braga
2004-12-23  9:20       ` [Qemu-devel] " Ronald
2004-12-23 18:31       ` [Qemu-devel] " Andreas Bollhalder
2004-12-19 18:15 Johannes Schindelin
2004-12-19 19:32 ` Magnus Damm
2004-12-19 19:44   ` Johannes Schindelin
2004-12-19 20:40     ` Magnus Damm
2004-12-19 22:33       ` Johannes Schindelin
2004-12-19 23:01         ` Andreas Bollhalder
2004-12-20 15:12           ` Johannes Schindelin
2004-12-19 21:02     ` Panagiotis Issaris
2004-12-19 22:37       ` Johannes Schindelin
2004-12-20  8:32 ` zitu
2004-12-20 15:25   ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).