summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-12-24 02:11:48 +0100
committerMike Yuan <me@yhndnzj.com>2023-12-25 10:47:18 +0100
commit8ba111463db94f4a31605c97c0aa7f961c0b6f2f (patch)
tree7960a1b0e7de16211414d0e80311187f4de97dee /src/core
parentformat-table: introduce table_isempty and use it where appropriate (diff)
downloadsystemd-8ba111463db94f4a31605c97c0aa7f961c0b6f2f.tar.xz
systemd-8ba111463db94f4a31605c97c0aa7f961c0b6f2f.zip
core,format-table: use strna/ersatz for formatting fdstore dump
Currently, the code doesn't handle anonymous inodes correctly.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 7bd4e99b11..495b183321 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -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)));
}
}