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>
This commit is contained in:
S-G Bergh 2012-11-05 13:16:07 +01:00 committed by Denys Vlasenko
parent 5694afd72a
commit d2d5049c1d

View File

@ -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) if (volume_id_probe_all(vid, /*0,*/ size) != 0)
goto ret; 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)); *label = xstrndup(vid->label, sizeof(vid->label));
*uuid = xstrndup(vid->uuid, sizeof(vid->uuid)); *uuid = xstrndup(vid->uuid, sizeof(vid->uuid));
#if ENABLE_FEATURE_BLKID_TYPE #if ENABLE_FEATURE_BLKID_TYPE