From d294c99fe5bb4d0f8a5187e23c81b5a8fe7224e8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 9 Sep 2020 12:31:50 -0700 Subject: blkid: don't show empty tags. The util-linux blkid (even if explicitly asked with -s) won't show you a tag with no value. --- toys/other/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/blkid.c b/toys/other/blkid.c index 40391de4..e3badca7 100644 --- a/toys/other/blkid.c +++ b/toys/other/blkid.c @@ -73,7 +73,7 @@ static void show_tag(char *key, char *value) for (al = TT.s; al; al = al->next) if (!strcmp(key, al->arg)) show = 1; } else show = 1; - if (show) printf(" %s=\"%s\"", key, value); + if (show && *value) printf(" %s=\"%s\"", key, value); } static void flagshow(char *s, char *name) -- cgit v1.2.3