vvfat: Fix default volume label
authorKevin Wolf <kwolf@redhat.com>
Wed, 27 Apr 2016 12:18:16 +0000 (14:18 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 29 Apr 2016 09:14:13 +0000 (11:14 +0200)
Commit d5941dd documented that it leaves the default volume name as it
was ("QEMU VVFAT"), but it doesn't actually implement this. You get an
empty name (eleven space characters) instead.

This fixes the implementation to apply the advertised default.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
block/vvfat.c

index ff3df35eb042cef6eba27d263168179a5b5c9908..183fc4f049a134e7721d9d4c55b5945e8075e7b3 100644 (file)
@@ -1109,6 +1109,8 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
             goto fail;
         }
         memcpy(s->volume_label, label, label_length);
+    } else {
+        memcpy(s->volume_label, "QEMU VVFAT", 10);
     }
 
     if (floppy) {