lsfd: add MODE column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This commit is contained in:
parent
22b7cf51cc
commit
17adf20f12
3 changed files with 18 additions and 1 deletions
|
@ -244,6 +244,14 @@ static bool file_fill_column(struct proc *proc,
|
|||
case COL_MNT_ID:
|
||||
xasprintf(&str, "%d", file->association < 0? 0: file->mnt_id);
|
||||
break;
|
||||
case COL_MODE:
|
||||
if (file->association < 0)
|
||||
xasprintf(&str, "---");
|
||||
else
|
||||
xasprintf(&str, "%c%c-",
|
||||
file->mode & S_IRUSR? 'r': '-',
|
||||
file->mode & S_IWUSR? 'w': '-');
|
||||
break;
|
||||
case COL_POS:
|
||||
xasprintf(&str, "%llu",
|
||||
file->association < 0? 0: file->pos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue