Whamcloud - gitweb
Fix blkid bug with correctly reporting FAT filesystem labels that are empty
authorKarel Zak <kzak@redhat.com>
Mon, 18 Sep 2006 01:23:46 +0000 (21:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 18 Sep 2006 01:23:46 +0000 (21:23 -0400)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/blkid/ChangeLog
lib/blkid/probe.c

index 4f46942..e4939e0 100644 (file)
@@ -1,3 +1,7 @@
+2006-09-17  Karel Zak  <kzak@redhat.com> 
+
+       * probe.c (probe_fat): Fix problem with empty FAT label.
+
 2006-09-17  Karel Zak  <kzak@redhat.com>
 
        * probe.c (probe_gfs, _gfs2), probe.h: Add support for GFS/GFS2 
index f06a5d0..0f16565 100644 (file)
@@ -350,8 +350,8 @@ static int probe_fat(struct blkid_probe *probe,
        }
 
        if (vol_label && memcmp(vol_label, no_name, 11)) {
-               label = vol_label;
-               label_len = figure_label_len(vol_label, 11);
+               if ((label_len = figure_label_len(vol_label, 11)))
+                       label = vol_label;
        }
 
        /* We can't just print them as %04X, because they are unaligned */