diff options
author | Elliott Hughes <enh@google.com> | 2020-09-09 12:31:50 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-09-10 00:56:27 -0500 |
commit | d294c99fe5bb4d0f8a5187e23c81b5a8fe7224e8 (patch) | |
tree | 6adb6688525a9b7e606f4e52dc1699981b44ca85 /toys/other | |
parent | 53b2daab9413fe8dab202fd72e5a238594cb0371 (diff) | |
download | toybox-d294c99fe5bb4d0f8a5187e23c81b5a8fe7224e8.tar.gz |
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.
Diffstat (limited to 'toys/other')
-rw-r--r-- | toys/other/blkid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |