case COL_SIZE:
xasprintf(&str, "%ju", file->stat.st_size);
break;
+ case COL_NLINK:
+ xasprintf(&str, "%ju", (unsigned long int)file->stat.st_nlink);
+ break;
+ case COL_DELETED:
+ xasprintf(&str, "%d", file->stat.st_nlink == 0);
+ break;
default:
return false;
};
N_("association between file and process") },
[COL_COMMAND] = { "COMMAND", 15, 0, SCOLS_JSON_STRING,
N_("command of the process opening the file") },
+ [COL_DELETED] = { "DELETED", 0, SCOLS_FL_RIGHT, SCOLS_JSON_BOOLEAN,
+ N_("reachability from the file system") },
[COL_DEV] = { "DEV", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
N_("ID of device containing file") },
[COL_DEVICE] = { "DEVICE", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,
N_("inode number") },
[COL_NAME] = { "NAME", 45, 0, SCOLS_JSON_STRING,
N_("name of the file") },
+ [COL_NLINK] = { "NLINK", 0, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
+ N_("link count") },
[COL_PID] = { "PID", 5, SCOLS_FL_RIGHT, SCOLS_JSON_NUMBER,
N_("PID of the process opening the file") },
[COL_RDEV] = { "RDEV", 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING,