summaryrefslogtreecommitdiff
path: root/src/shutdown
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-11-15 14:56:35 +0100
committerLennart Poettering <lennart@poettering.net>2019-11-15 14:56:35 +0100
commitf795267e3ad419c1f40dec0d3aef77cb8db3b841 (patch)
tree3feb5ab21ee19fd0d47aa11fffb70d20f3d12c64 /src/shutdown
parent7be830c6e8cd3852e3468203812445115f5ea183 (diff)
downloadsystemd-f795267e3ad419c1f40dec0d3aef77cb8db3b841.tar.gz
systemd-f795267e3ad419c1f40dec0d3aef77cb8db3b841.tar.bz2
systemd-f795267e3ad419c1f40dec0d3aef77cb8db3b841.zip
shutdown: make logging more useful if NULL swap/mount table files are specified
Makes the error output seen in #13993 more readable.
Diffstat (limited to 'src/shutdown')
-rw-r--r--src/shutdown/umount.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 4563a9d720..4a96e1b794 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -62,7 +62,7 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
r = libmount_parse(mountinfo, NULL, &table, &iter);
if (r < 0)
- return log_error_errno(r, "Failed to parse %s: %m", mountinfo);
+ return log_error_errno(r, "Failed to parse %s: %m", mountinfo ?: "/proc/self/mountinfo");
for (;;) {
struct libmnt_fs *fs;
@@ -77,7 +77,7 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
if (r == 1)
break;
if (r < 0)
- return log_error_errno(r, "Failed to get next entry from %s: %m", mountinfo);
+ return log_error_errno(r, "Failed to get next entry from %s: %m", mountinfo ?: "/proc/self/mountinfo");
path = mnt_fs_get_target(fs);
if (!path)
@@ -185,7 +185,7 @@ int swap_list_get(const char *swaps, MountPoint **head) {
r = mnt_table_parse_swaps(t, swaps);
if (r < 0)
- return log_error_errno(r, "Failed to parse %s: %m", swaps);
+ return log_error_errno(r, "Failed to parse %s: %m", swaps ?: "/proc/swaps");
for (;;) {
struct libmnt_fs *fs;
@@ -196,7 +196,7 @@ int swap_list_get(const char *swaps, MountPoint **head) {
if (r == 1)
break;
if (r < 0)
- return log_error_errno(r, "Failed to get next entry from %s: %m", swaps);
+ return log_error_errno(r, "Failed to get next entry from %s: %m", swaps ?: "/proc/swaps");
source = mnt_fs_get_source(fs);
if (!source)