From 5b759bf5fd3a915a5b4756590caff7faf43a9693 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 23 May 2025 12:15:45 +0200 Subject: [PATCH] homed: generate proper error if we cannot create mountpoint for homedir Let's make this easier to debug. (When this failed for me due to disk full it took me a bit to figure out what was going on.) --- src/home/homework-mount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/home/homework-mount.c b/src/home/homework-mount.c index 2b340ce54cb..56b83147bfd 100644 --- a/src/home/homework-mount.c +++ b/src/home/homework-mount.c @@ -140,7 +140,9 @@ int home_move_mount(const char *mount_suffix, const char *target) { } else d = HOME_RUNTIME_WORK_DIR; - (void) mkdir_p(target, 0700); + r = mkdir_p(target, 0700); + if (r < 0) + return log_error_errno(r, "Failed to create directory '%s': %m", target); r = mount_nofollow_verbose(LOG_ERR, d, target, NULL, MS_BIND, NULL); if (r < 0) -- 2.47.3