X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libblkid-tiny%2Fvfat.c;h=ef66769a09b6d25d153032abc11c03acba741c27;hb=1015c3779f37a17c6a2512bfc817e56d3042a237;hp=dd53d6856cd3b4c5c24a71fc267028a269fc178a;hpb=9f7073df932cfb5037df05c6a3bb0b6cd3ee076c;p=project%2Fubox.git diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c index dd53d68..ef66769 100644 --- a/libblkid-tiny/vfat.c +++ b/libblkid-tiny/vfat.c @@ -277,9 +277,12 @@ static int set_label(blkid_probe pr, unsigned char *vol_label) { unsigned char *c; - for (c = vol_label + 10; c > vol_label && *c == ' '; c--) + for (c = vol_label + 10; c >= vol_label && *c == ' '; c--) *c = 0; + if (!*vol_label) + return 0; + return blkid_probe_set_label(pr, vol_label, 11); }