From: Lennart Poettering Date: Fri, 23 May 2025 10:15:45 +0000 (+0200) Subject: homed: generate proper error if we cannot create mountpoint for homedir X-Git-Tag: v258-rc1~484 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b759bf5fd3a915a5b4756590caff7faf43a9693;p=thirdparty%2Fsystemd.git 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.) --- 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)