diff mbox

[v2,2/2] vvfat: Fix default volume label

Message ID 1461843366-27217-3-git-send-email-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kevin Wolf April 28, 2016, 11:36 a.m. UTC
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>
---
 block/vvfat.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Markus Armbruster April 28, 2016, 6:30 p.m. UTC | #1
Kevin Wolf <kwolf@redhat.com> writes:

> 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.

Hrmph.

> 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>
> ---
>  block/vvfat.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/block/vvfat.c b/block/vvfat.c
> index ff3df35..183fc4f 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -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) {

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Stefan Hajnoczi April 29, 2016, 9:08 a.m. UTC | #2
On Thu, Apr 28, 2016 at 01:36:06PM +0200, Kevin Wolf wrote:
> 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>
> ---
>  block/vvfat.c | 2 ++
>  1 file changed, 2 insertions(+)

Nice, thanks for fixing this.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/block/vvfat.c b/block/vvfat.c
index ff3df35..183fc4f 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -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) {