diff options
author | S-G Bergh <sgb@systemasis.org> | 2012-11-05 13:16:07 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-11-05 13:16:07 +0100 |
commit | d2d5049c1d1ebb052387790df04740a3857fde63 (patch) | |
tree | 4a1f8b46b9e78e0a7629a4bcd0a5fd72b5a729fc | |
parent | 5694afd72a0a424fcdd2ac85838229a1a86b7e84 (diff) | |
download | busybox-d2d5049c1d1ebb052387790df04740a3857fde63.tar.gz |
blkid: show filesystem when both label and UUID are missing, but type is known
Signed-off-by: S-G Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/volume_id/get_devname.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c index 230102d89..665cb9b6e 100644 --- a/util-linux/volume_id/get_devname.c +++ b/util-linux/volume_id/get_devname.c @@ -49,7 +49,11 @@ get_label_uuid(int fd, char **label, char **uuid, const char **type) if (volume_id_probe_all(vid, /*0,*/ size) != 0) goto ret; - if (vid->label[0] != '\0' || vid->uuid[0] != '\0') { + if (vid->label[0] != '\0' || vid->uuid[0] != '\0' +#if ENABLE_FEATURE_BLKID_TYPE + || vid->type != NULL +#endif + ) { *label = xstrndup(vid->label, sizeof(vid->label)); *uuid = xstrndup(vid->uuid, sizeof(vid->uuid)); #if ENABLE_FEATURE_BLKID_TYPE |