if (scols_line_set_data(ln, column_index, "BLK"))
err(EXIT_FAILURE, _("failed to add output data"));
return true;
+ case COL_DEVTYPE:
+ if (scols_line_set_data(ln, column_index,
+ "blk"))
+ err(EXIT_FAILURE, _("failed to add output data"));
+ return true;
case COL_DEVNAME:
case COL_PARTITION:
partition = get_partition(file->stat.st_rdev);
break;
}
return true;
+ case COL_DEVTYPE:
+ if (scols_line_set_data(ln, column_index,
+ "char"))
+ err(EXIT_FAILURE, _("failed to add output data"));
+ return true;
case COL_CHRDRV:
chrdrv = get_chrdrv(major(file->stat.st_rdev));
if (chrdrv)
(int)proc->uid)->name))
err(EXIT_FAILURE, _("failed to add output data"));
return true;
+ case COL_DEVTYPE:
+ if (scols_line_set_data(ln, column_index,
+ "nodev"))
+ err(EXIT_FAILURE, _("failed to add output data"));
+ return true;
case COL_FD:
if (file->association < 0)
return false;
N_("ID of device containing file") },
[COL_DEVNAME] = { "DEVNAME", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
N_("device name, decoded version of DEVICE") },
+ [COL_DEVTYPE] = { "DEVTYPE", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
+ N_("device type (blk, char, or nodev") },
[COL_FLAGS] = { "FLAGS", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
N_("flags specified when opening the file") },
[COL_FD] = { "FD", 0, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,