From b2d8cf906502226904e149e20279a899ba22e035 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 31 Oct 2017 15:43:38 -0500 Subject: Only show LABEL= when there is one. --- toys/other/blkid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys') 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) { -- cgit v1.2.3