The libsmartcols is smart enough to accept NULL for empty fields
rather than empty strings.
Signed-off-by: Karel Zak <kzak@redhat.com>
case COL_UUID:
if (pr && !blkid_probe_lookup_value(pr, "UUID", &data, NULL))
xasprintf(&str, "%s", data);
- else if (pr)
- xasprintf(&str, "");
- else
+ else if (!pr)
xasprintf(&str, _("read failed"));
break;
case COL_LABEL:
if (pr && !blkid_probe_lookup_value(pr, "LABEL", &data, NULL))
xasprintf(&str, "%s", data);
- else if (pr)
- xasprintf(&str, "");
- else
+ else if (!pr)
xasprintf(&str, _("read failed"));
break;
default: