projects
/
oweals
/
ubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f7073d
)
block: discard vfat labels with only spaces
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 25 Jul 2013 12:23:07 +0000
(14:23 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 25 Jul 2013 12:23:07 +0000
(14:23 +0200)
libblkid-tiny/vfat.c
patch
|
blob
|
history
diff --git
a/libblkid-tiny/vfat.c
b/libblkid-tiny/vfat.c
index dd53d6856cd3b4c5c24a71fc267028a269fc178a..ef66769a09b6d25d153032abc11c03acba741c27 100644
(file)
--- 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);
}