Searched refs:mount (Results 1 - 25 of 30) sorted by relevance

12

/systemd/src/shared/
H A Dswitch-root.c25 #include <sys/mount.h>
72 if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
73 log_warning_errno(errno, "Failed to make \"/\" private mount: %m");
87 * stat failed. Unmount the old mount
94 if (mount(i, new_mount, NULL, mountflags, NULL) < 0) {
96 log_error_errno(errno, "Failed to move mount %s to %s, forcing unmount: %m", i, new_mount);
102 log_error_errno(errno, "Failed to bind mount %s to %s: %m", i, new_mount);
135 } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0)
136 return log_error_errno(errno, "Failed to mount moving %s to /: %m", new_root);
H A Dfstab-util.h27 bool fstab_is_mount_point(const char *mount);
H A Dfstab-util.c30 #include "mount-util.h"
37 bool fstab_is_mount_point(const char *mount) { argument
46 if (path_equal(m->mnt_dir, mount))
H A Dmachine-pool.c28 #include <sys/mount.h>
49 #include "mount-util.h"
86 * btrfs file system into it, and mount it to
228 log_debug("/var/lib/machines is already a mount point, not creating loopback file for it.");
284 * let's mount the directory into an inaccessible directory
289 r = sd_bus_error_set_errnof(error, errno, "Failed to create temporary mount parent directory: %m");
296 r = sd_bus_error_set_errnof(error, errno, "Failed to create temporary mount directory: %m");
301 if (mount(loopdev, mntdir, "btrfs", 0, NULL) < 0) {
302 r = sd_bus_error_set_errnof(error, errno, "Failed to mount loopback device: %m");
322 if (mount(mntdi
[all...]
/systemd/src/nspawn/
H A Dnspawn-cgroup.c20 #include <sys/mount.h>
90 /* In order to access the unified hierarchy we need to mount it */
92 return log_error_errno(errno, "Failed to generate temporary mount point for unified hierarchy: %m");
95 r = mount("cgroup", tree, "cgroup", MS_NOSUID|MS_NOEXEC|MS_NODEV, "none,name=systemd,xattr");
97 r = mount("cgroup", tree, "cgroup", MS_NOSUID|MS_NOEXEC|MS_NODEV, "__DEVEL__sane_behavior");
99 r = log_error_errno(errno, "Failed to mount unified hierarchy: %m");
H A Dnspawn-mount.c20 #include <sys/mount.h>
29 #include "mount-util.h"
30 #include "nspawn-mount.h"
244 if (mount("sysfs", full, "sysfs", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL) < 0)
245 return log_error_errno(errno, "Failed to mount sysfs to %s: %m", full);
260 if (mount(from, to, NULL, MS_BIND, NULL) < 0)
261 return log_error_errno(errno, "Failed to mount /sys/%s into place: %m", x);
263 if (mount(NULL, to, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, NULL) < 0)
264 return log_error_errno(errno, "Failed to mount /sys/%s read-only: %m", x);
276 if (mount(NUL
[all...]
H A Dnspawn.c38 #include <sys/mount.h>
71 #include "mount-util.h"
75 #include "nspawn-mount.h"
241 " Bind mount a file or directory from the host into\n"
244 " Similar, but creates a read-only bind mount\n"
247 " Create an overlay mount from the host to \n"
250 " Similar, but creates a read-only overlay mount\n"
682 * mount point the same as the upper. */
1157 if (mount(from, to, NULL, MS_BIND, NULL) < 0)
1158 r = log_error_errno(errno, "Failed to bind mount boo
[all...]
/systemd/src/test/
H A Dtest-udev.c25 #include <sys/mount.h>
43 { "test/sys", "/sys", "failed to mount test /sys" },
44 { "test/dev", "/dev", "failed to mount test /dev" },
45 { "test/run", "/run", "failed to mount test /run" },
46 { "test/run", "/etc/udev/rules.d", "failed to mount empty /etc/udev/rules.d" },
47 { "test/run", UDEVLIBEXECDIR "/rules.d","failed to mount empty " UDEVLIBEXECDIR "/rules.d" },
59 if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) < 0) {
61 fprintf(stderr, "failed to mount / as private: %m\n");
66 err = mount(fakefss[i].src, fakefss[i].target, NULL, MS_BIND, NULL);
H A Dtest-path-util.c21 #include <sys/mount.h>
27 #include "mount-util.h"
301 char tmp_dir[] = "/tmp/test-path-is-mount-point-XXXXXX";
387 if (mount(file1, file2, NULL, MS_BIND, NULL) >= 0) {
411 assert_se(mount(dir2, dir1, NULL, MS_BIND, NULL) >= 0);
417 /* its parent is a mount point, but not /file itself */
431 printf("Skipping bind mount file test: %m\n");
/systemd/test/TEST-02-CRYPTSETUP/
H A Dtest.sh11 mount ${LOOPDEV}p1 $TESTDIR/root
15 mount /dev/mapper/varcrypt $TESTDIR/root/var
43 mount ${LOOPDEV}p1 $TESTDIR/root
45 mount /dev/mapper/varcrypt $TESTDIR/root/var
/systemd/test/TEST-03-JOBS/
H A Dtest.sh11 mount ${LOOPDEV}p1 $TESTDIR/root
40 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/test/TEST-04-JOURNAL/
H A Dtest.sh11 mount ${LOOPDEV}p1 $TESTDIR/root
40 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/test/TEST-05-RLIMITS/
H A Dtest.sh11 mount ${LOOPDEV}p1 $TESTDIR/root
40 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/src/core/
H A Dnamespace.c24 #include <sys/mount.h>
35 #include "mount-util.h"
157 if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
164 if (mount("/dev/pts", devpts, NULL, MS_BIND, NULL) < 0) {
177 r = mount("/dev/shm", devshm, NULL, MS_BIND, NULL);
185 (void) mount("/dev/mqueue", devmqueue, NULL, MS_BIND, NULL);
189 (void) mount("/dev/hugepages", devhugepages, NULL, MS_BIND, NULL);
237 * consistent with mount units creating the mount points when missing.
241 if (mount(de
[all...]
H A Dmachine-id-setup.c25 #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 namespac
[all...]
H A Dmount-setup.c23 #include <sys/mount.h>
36 #include "mount-setup.h"
37 #include "mount-util.h"
129 /* Checks if this mount point is considered "API", and hence
163 log_full_errno((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, r, "Failed to determine whether %s is a mount point: %m", p->where);
186 if (mount(p->what,
191 log_full_errno((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, errno, "Failed to mount %s at %s: %m", p->type, p->where);
220 /* Do a minimal mount of /proc and friends to enable the most
329 (void) mount("tmpfs", "/sys/fs/cgroup", "tmpfs", MS_REMOUNT|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME|MS_RDONLY, "mode=755");
392 /* Mark the root directory as shared in regards to mount
[all...]
H A Dmount.c28 #include "dbus-mount.h"
36 #include "mount-setup.h"
37 #include "mount-util.h"
38 #include "mount.h"
131 if (unit_has_name(u, "-.mount")) {
137 * dep loop, don't use kmsg logging for -.mount */
142 /* We need to make sure that /usr/bin/mount is always called
144 * side doesn't send us another mount request while we are
178 (void) sd_event_source_set_description(m->timer_event_source, "mount-timer");
251 /* Adds in links to other mount point
1673 Mount *mount = MOUNT(u); local
1684 Mount *mount = MOUNT(u); local
[all...]
H A Dshutdown.c27 #include <sys/mount.h>
147 if (mount("/run/initramfs", "/run/initramfs", NULL, MS_BIND, NULL) < 0)
148 return log_error_errno(errno, "Failed to mount bind /run/initramfs on /run/initramfs: %m");
150 if (mount(NULL, "/run/initramfs", NULL, MS_PRIVATE, NULL) < 0)
151 return log_error_errno(errno, "Failed to make /run/initramfs private mount: %m");
H A Dumount.c25 #include <sys/mount.h>
35 #include "mount-setup.h"
85 "%*s " /* (1) mount id */
89 "%ms " /* (5) mount point */
90 "%*s" /* (6) mount flags */
94 "%*s" /* (10) mount source */
95 "%ms" /* (11) mount options */
110 /* Ignore mount points we can't unmount because they
376 read-only mount anything as that brings no real
382 * should be the same from the original mount
[all...]
/systemd/test/TEST-01-BASIC/
H A Dtest.sh11 mount ${LOOPDEV}p1 $TESTDIR/root
40 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/test/TEST-07-ISSUE-1981/
H A Dtest.sh22 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/src/basic/
H A Dmount-util.c23 #include <sys/mount.h>
33 #include "mount-util.h"
90 * tells us the mount id and an opaque file "handle". It is
93 * the mount id is usually good enough to tell us whether
94 * something is a mount point.
96 * If that didn't work we will try to read the mount id from
101 * consider a mount point. Hence we use this only as
122 * mount point), otherwise fallback to the
139 * If so, it must be a mount point. */
147 * must be a mount poin
[all...]
/systemd/test/TEST-06-SELINUX/
H A Dtest.sh18 mount ${LOOPDEV}p1 $TESTDIR/root
41 mount ${LOOPDEV}p1 $TESTDIR/root
/systemd/test/
H A Dtest-efi-create-disk.sh12 mount ${LOOP}p1 mnt
/systemd/src/machine/
H A Dmachine-dbus.c22 #include <sys/mount.h>
915 return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Container does not allow propagation of mount points.");
917 /* Our goal is to install a new bind mount into the container,
922 that we can mount MS_SLAVE. (Which is necessary, since
931 if (mount(mount_slave, mount_slave, NULL, MS_BIND, NULL) < 0) {
932 r = sd_bus_error_set_errnof(error, errno, "Failed to make bind mount %s: %m", mount_slave);
938 if (mount(NULL, mount_slave, NULL, MS_SLAVE, NULL) < 0) {
943 /* Second, we mount the source directory to a directory inside
945 mount_tmp = strjoina(mount_slave, "/mount");
947 r = sd_bus_error_set_errnof(error, errno, "Failed to create temporary mount poin
[all...]

Completed in 50 milliseconds

12