Patchwork Virtual VFAT with floppy option doesn't work

login
register
mail settings
Submitter Kiyokazu SUTO
Date Jan. 6, 2014, 10:58 a.m.
Message ID <20140106-195827-666c9.suto@ks-and-ks.ne.jp>
Download mbox | patch
Permalink /patch/307345/
State New
Headers show

Comments

Kiyokazu SUTO - Jan. 6, 2014, 10:58 a.m.
Hi,

Virtual VFAT mechanism in recent releases does not work with the
floppy option, because, in `vvfat_open()' function, the member
`first_sectors_number' is overwritten with the value for HDD even when
the floppy option presents.  I attach the diff output just to clarify
the problem.

Sorry if this has been already fixed in the git repository.

Regards,
Markus Armbruster - March 27, 2014, 12:30 p.m.
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> writes:

> Hi,
>
> Virtual VFAT mechanism in recent releases does not work with the
> floppy option, because, in `vvfat_open()' function, the member
> `first_sectors_number' is overwritten with the value for HDD even when
> the floppy option presents.  I attach the diff output just to clarify
> the problem.
>
> Sorry if this has been already fixed in the git repository.

Your fix is correct, but the patch doesn't pass checkpatch, it doesn't
have a proper commit message, and it lacks your S-o-B.  Since the fix is
trivial, and we're very close to the release, I'm going to redo it.
Hope you don't mind.
Kiyokazu SUTO - March 27, 2014, 6:40 p.m.
Citation (with leading "> " of each line) from article:
  <8761mzq0wl.fsf@blackfin.pond.sub.org>
    by Markus Armbruster <armbru@redhat.com> :
> Your fix is correct, but the patch doesn't pass checkpatch, it doesn't
> have a proper commit message, and it lacks your S-o-B.  Since the fix is
> trivial, and we're very close to the release, I'm going to redo it.
> Hope you don't mind.

I do not mind at all.  My post was just a report.  I'm sorry if it
wasted your time.

Thanks for fixing the problem.

Regards,
Markus Armbruster - March 28, 2014, 8:13 a.m.
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> writes:

> Citation (with leading "> " of each line) from article:
>   <8761mzq0wl.fsf@blackfin.pond.sub.org>
>     by Markus Armbruster <armbru@redhat.com> :
>> Your fix is correct, but the patch doesn't pass checkpatch, it doesn't
>> have a proper commit message, and it lacks your S-o-B.  Since the fix is
>> trivial, and we're very close to the release, I'm going to redo it.
>> Hope you don't mind.
>
> I do not mind at all.  My post was just a report.  I'm sorry if it
> wasted your time.
>
> Thanks for fixing the problem.

You certainly didn't waste my time!  Thanks for your clear bug report.

Patch

diff -up qemu-1.7.0/block/vvfat.c{-dist,}
--- qemu-1.7.0/block/vvfat.c-dist       2013-11-28 07:15:55.000000000 +0900
+++ qemu-1.7.0/block/vvfat.c    2014-01-06 07:03:45.000000000 +0900
@@ -1123,6 +1123,7 @@  DLOG(if (stderr == NULL) {
         if (!s->fat_type) {
             s->fat_type = 16;
         }
+       s->first_sectors_number=0x40;
         cyls = s->fat_type == 12 ? 64 : 1024;
         heads = 16;
         secs = 63;
@@ -1151,7 +1152,6 @@  DLOG(if (stderr == NULL) {
 
     s->current_cluster=0xffffffff;
 
-    s->first_sectors_number=0x40;
     /* read only is the default for safety */
     bs->read_only = 1;
     s->qcow = s->write_target = NULL;