aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-10-31 15:43:38 -0500
committerRob Landley <rob@landley.net>2017-10-31 15:43:38 -0500
commitb2d8cf906502226904e149e20279a899ba22e035 (patch)
tree746dc54b2ffbafa933e2d68bd9417861345c4b6a /toys
parent2d893a4077c12732238f5a9fc9c31fda8bcc3ed9 (diff)
downloadtoybox-b2d8cf906502226904e149e20279a899ba22e035.tar.gz
Only show LABEL= when there is one.
Diffstat (limited to 'toys')
-rw-r--r--toys/other/blkid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/blkid.c b/toys/other/blkid.c
index 04c9b5f0..ee3564cf 100644
--- a/toys/other/blkid.c
+++ b/toys/other/blkid.c
@@ -116,14 +116,14 @@ static void do_blkid(int fd, char *name)
printf("%s:",name);
if (fstypes[i].label_len) {
- char *s = toybuf+fstypes[i].label_off-off;;
+ char *s = toybuf+fstypes[i].label_off-off;
len = fstypes[i].label_len;
if (!strcmp(type, "vfat")) {
while (len && s[len-1]==' ') len--;
if (strstart(&s, "NO NAME")) len=0;
}
- if (len) printf(" LABEL=\"%.*s\"", len, s);
+ if (len && *s) printf(" LABEL=\"%.*s\"", len, s);
}
if (fstypes[i].uuid_off) {