]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: add dax (direct access) capability column
authorAnthony Iliopoulos <ailiop@suse.com>
Tue, 5 May 2020 14:31:44 +0000 (16:31 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 May 2020 13:09:39 +0000 (15:09 +0200)
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
misc-utils/lsblk.c

index 72ac7b483215f69bba784a20b402acd3b4048edd..51b9f6ad7c20c2556e4744248008f99dc35ce64d 100644 (file)
@@ -117,6 +117,7 @@ enum {
        COL_REV,
        COL_VENDOR,
        COL_ZONED,
+       COL_DAX
 };
 
 /* basic table settings */
@@ -208,6 +209,7 @@ static struct colinfo infos[] = {
        [COL_REV]    = { "REV",   4, SCOLS_FL_RIGHT, N_("device revision") },
        [COL_VENDOR] = { "VENDOR", 0.1, SCOLS_FL_TRUNC, N_("device vendor") },
        [COL_ZONED]  = { "ZONED", 0.3, 0, N_("zone model") },
+       [COL_DAX]    = { "DAX", 1, SCOLS_FL_RIGHT, N_("dax-capable device"), COLTYPE_BOOL },
 };
 
 struct lsblk *lsblk;   /* global handler */
@@ -1031,6 +1033,9 @@ static char *device_get_data(
        case COL_ZONED:
                ul_path_read_string(dev->sysfs, &str, "queue/zoned");
                break;
+       case COL_DAX:
+               ul_path_read_string(dev->sysfs, &str, "queue/dax");
+               break;
        };
 
        return str;