Lines Matching refs:mount
25 #include <sys/mount.h>
40 #include "mount-util.h"
283 /* And now, let's mount it over */
284 if (mount(run_machine_id, etc_machine_id, NULL, MS_BIND, NULL) < 0) {
286 return log_error_errno(errno, "Failed to mount %s: %m", etc_machine_id);
291 /* Mark the mount read-only */
292 if (mount(NULL, etc_machine_id, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL) < 0)
315 return log_error_errno(r, "Failed to determine whether %s is a mount point: %m", etc_machine_id);
317 log_debug("%s is is not a mount point. Nothing to do.", etc_machine_id);
340 /* Store current mount namespace */
343 return log_error_errno(r, "Can't fetch current mount namespace: %m");
345 /* Switch to a new mount namespace, isolate ourself and unmount etc_machine_id in our new namespace */
349 if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL) < 0)
369 return log_warning_errno(r, "Failed to switch back to initial mount namespace: %m.\nWe'll keep transient %s file until next reboot.", etc_machine_id);
372 return log_warning_errno(errno, "Failed to unmount transient %s file: %m.\nWe keep that mount until next reboot.", etc_machine_id);