diff options
-rw-r--r-- | misc-utils/lsblk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 752783af1..8e6e6c5ac 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -758,7 +758,9 @@ static char *get_transport(struct blkdev_cxt *cxt) else if (strstr(attr, "ata")) trans = "ata"; free(attr); - } + + } else if (strncmp(cxt->name, "nvme", 4) == 0) + trans = "nvme"; return trans ? xstrdup(trans) : NULL; } @@ -1001,6 +1003,8 @@ static void set_scols_data(struct blkdev_cxt *cxt, int col, int id, struct libsc get_udev_properties(cxt); if (cxt->serial) str = xstrdup(cxt->serial); + else + str = sysfs_strdup(&cxt->sysfs, "device/serial"); } break; case COL_REV: |