Tiny compliance bug in `block-vvfat.c'
[I'm not subscribed to the mailing list, so please keep me cced.]
Hello!
We kept wondering why the GNU/Hurd's `fatfs' translator (think Unix kernel file system driver) didn't want to ``eat'' the QEMU vvfat on-the-fly served floppy images (created from a directory structure using ``-fdb fat:floppy:some/where'') until we finally traced it down to a tiny QEMU bug in the said vvfat code -- see the following patch. That translator kept telling us that it had expected the file system image to be as twice as big as it actually was.
Handling such images was no problem for GNU GRUB and the Linux kernel, but it seems that the GNU/Hurd's fat file system implementation is more obeying to standards. (Now, is that good or bad? ;-)
Otherwise, QEMU is working fine for the GNU/Hurd and the GNU/Hurd is working fine in QEMU. If someone wants to give it a try, please speak up.
#v+
2007-03-28 Thomas Schwinge <[email protected]>
* block-vvfat.c (vvfat_open) <floppy>: Use eighteen sectors per track.
Index: block-vvfat.c
===================================================================
RCS file: /sources/qemu/qemu/block-vvfat.c,v
retrieving revision 1.8
block-vvfat.c +1 -1
@@ -1002,7 +1002,7 @@ DLOG(if (stderr == NULL) { s->fat_type =12 ; s->first_sectors_number =1 ; s->sectors_per_cluster=2 ; - bs->cyls =80 ; bs->heads =2 ; bs->secs =36 ; + bs->cyls =80 ; bs->heads =2 ; bs->secs =18 ; }if (strstr (dirname,":32:" )) {
#v-
Regards,
Thomas
Quoted 13 lines · Thomas Schwinge
[I'm not subscribed to the mailing list, so please keep me cced.]
Hello!
We kept wondering why the GNU/Hurd's `fatfs' translator (think Unix kernel file system driver) didn't want to ``eat'' the QEMU vvfat on-the-fly served floppy images (created from a directory structure using ``-fdb fat:floppy:some/where'') until we finally traced it down to a tiny QEMU bug in the said vvfat code -- see the following patch. That translator kept telling us that it had expected the file system image to be as twice as big as it actually was.
Quoted 3 lines
Handling such images was no problem for GNU GRUB and the Linux kernel, but it seems that the GNU/Hurd's fat file system implementation is more obeying to standards. (Now, is that good or bad? ;-)
It's bad AFAICS. 36 sectors is the right value for a 2.88 MB floppy.
Thiemo