mirror of
https://github.com/systemd/systemd
synced 2024-07-22 10:44:58 +00:00
core,format-table: use strna/ersatz for formatting fdstore dump
Currently, the code doesn't handle anonymous inodes correctly.
This commit is contained in:
parent
2413a0fab4
commit
8ba111463d
|
@ -903,12 +903,12 @@ static void service_dump_fdstore(Service *s, FILE *f, const char *prefix) {
|
|||
"%s%s '%s' (type=%s; dev=" DEVNUM_FORMAT_STR "; inode=%" PRIu64 "; rdev=" DEVNUM_FORMAT_STR "; path=%s; access=%s)\n",
|
||||
prefix, i == s->fd_store ? "File Descriptor Store Entry:" : " ",
|
||||
i->fdname,
|
||||
inode_type_to_string(st.st_mode),
|
||||
strna(inode_type_to_string(st.st_mode)),
|
||||
DEVNUM_FORMAT_VAL(st.st_dev),
|
||||
(uint64_t) st.st_ino,
|
||||
DEVNUM_FORMAT_VAL(st.st_rdev),
|
||||
strna(path),
|
||||
accmode_to_string(flags));
|
||||
strna(accmode_to_string(flags)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2003,7 +2003,7 @@ static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercas
|
|||
if (d->mode == MODE_INVALID)
|
||||
return table_ersatz_string(t);
|
||||
|
||||
return inode_type_to_string(d->mode);
|
||||
return inode_type_to_string(d->mode) ?: table_ersatz_string(t);
|
||||
|
||||
case TABLE_DEVNUM:
|
||||
if (devnum_is_zero(d->devnum))
|
||||
|
|
Loading…
Reference in a new issue