/* Create the source directory for bind-mounts if needed */
p = get_mount_parameters_fragment(m);
- if (p && mount_is_bind(p))
- (void) mkdir_p_label(p->what, m->directory_mode);
+ if (p && mount_is_bind(p)) {
+ r = mkdir_p_label(p->what, m->directory_mode);
+ if (r < 0)
+ log_unit_error_errno(UNIT(m), r, "Failed to make bind mount source '%s': %m", p->what);
+ }
if (p) {
_cleanup_free_ char *opts = NULL;
/* Hmm, either the source or the destination are missing. Let's see if we can create the destination, then try again */
if (stat(what, &st) < 0)
- log_debug_errno(errno, "Mount point source '%s' is not accessible: %m", what);
+ log_error_errno(errno, "Mount point source '%s' is not accessible: %m", what);
else {
int q;
q = touch(mount_entry_path(m));
if (q < 0)
- log_debug_errno(q, "Failed to create destination mount point node '%s': %m", mount_entry_path(m));
+ log_error_errno(q, "Failed to create destination mount point node '%s': %m", mount_entry_path(m));
else
try_again = true;
}
}
if (r < 0)
- return log_debug_errno(r, "Failed to mount %s to %s: %m", what, mount_entry_path(m));
+ return log_error_errno(r, "Failed to mount %s to %s: %m", what, mount_entry_path(m));
}
log_debug("Successfully mounted %s to %s", what, mount_entry_path(m));