diff options
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/service.c b/src/core/service.c index 8f4cd63670..dfad574e65 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -968,7 +968,7 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) { "%sResult: %s\n" "%sReload Result: %s\n" "%sClean Result: %s\n" - "%sMount Result: %s\n" + "%sLiveMount Result: %s\n" "%sPermissionsStartOnly: %s\n" "%sRootDirectoryStartOnly: %s\n" "%sRemainAfterExit: %s\n" @@ -5309,18 +5309,12 @@ static int service_can_live_mount(const Unit *u, sd_bus_error *error) { assert(u); /* Ensure that the unit runs in a private mount namespace */ - if (!exec_needs_mount_namespace(unit_get_exec_context(u), /* params= */ NULL, unit_get_exec_runtime(u))) { - - /* This is also called in property_get_can_live_mount(). Suppress the debugging log when called in it. */ - if (error) - log_unit_debug(u, "Unit not running in private mount namespace, cannot live mount"); - + if (!exec_needs_mount_namespace(unit_get_exec_context(u), /* params= */ NULL, unit_get_exec_runtime(u))) return sd_bus_error_setf( error, SD_BUS_ERROR_INVALID_ARGS, - "Live mounting for unit '%s' cannot be scheduled: unit not running in private mount namespace", + "Unit '%s' not running in private mount namespace, cannot live mount.", u->id); - } return 0; } |