aboutsummaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r--misc-utils/lsblk.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index cd9f1f823d..441655e249 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -79,6 +79,7 @@ enum {
COL_PTUUID,
COL_PTTYPE,
COL_PARTTYPE,
+ COL_PARTTYPENAME,
COL_PARTLABEL,
COL_PARTUUID,
COL_PARTFLAGS,
@@ -168,7 +169,8 @@ static struct colinfo infos[] = {
[COL_PTUUID] = { "PTUUID", 36, 0, N_("partition table identifier (usually UUID)") },
[COL_PTTYPE] = { "PTTYPE", 0.1, 0, N_("partition table type") },
- [COL_PARTTYPE] = { "PARTTYPE", 36, 0, N_("partition type UUID") },
+ [COL_PARTTYPE] = { "PARTTYPE", 36, 0, N_("partition type code or UUID") },
+ [COL_PARTTYPENAME] = { "PARTTYPENAME", 0.1, 0, N_("partition type name") },
[COL_PARTLABEL] = { "PARTLABEL", 0.1, 0, N_("partition LABEL") },
[COL_PARTUUID] = { "PARTUUID", 36, 0, N_("partition UUID") },
[COL_PARTFLAGS] = { "PARTFLAGS", 36, 0, N_("partition flags") },
@@ -826,6 +828,15 @@ static char *device_get_data(
if (prop && prop->parttype)
str = xstrdup(prop->parttype);
break;
+ case COL_PARTTYPENAME:
+ prop = lsblk_device_get_properties(dev);
+ if (prop && prop->parttype && prop->pttype) {
+ const char *x = lsblk_parttype_code_to_string(
+ prop->parttype, prop->pttype);
+ if (x)
+ str = xstrdup(x);
+ }
+ break;
case COL_PARTLABEL:
prop = lsblk_device_get_properties(dev);
if (prop && prop->partlabel)