Lines Matching defs:dev

30 #include "dev-setup.h"
136 "/dev/null\0"
137 "/dev/zero\0"
138 "/dev/full\0"
139 "/dev/random\0"
140 "/dev/urandom\0"
141 "/dev/tty\0";
143 char temporary_mount[] = "/tmp/namespace-dev-XXXXXX";
144 const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL, *devptmx = NULL;
155 dev = strjoina(temporary_mount, "/dev");
156 (void) mkdir(dev, 0755);
157 if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
162 devpts = strjoina(temporary_mount, "/dev/pts");
164 if (mount("/dev/pts", devpts, NULL, MS_BIND, NULL) < 0) {
169 devptmx = strjoina(temporary_mount, "/dev/ptmx");
175 devshm = strjoina(temporary_mount, "/dev/shm");
177 r = mount("/dev/shm", devshm, NULL, MS_BIND, NULL);
183 devmqueue = strjoina(temporary_mount, "/dev/mqueue");
185 (void) mount("/dev/mqueue", devmqueue, NULL, MS_BIND, NULL);
187 devhugepages = strjoina(temporary_mount, "/dev/hugepages");
189 (void) mount("/dev/hugepages", devhugepages, NULL, MS_BIND, NULL);
191 devlog = strjoina(temporary_mount, "/dev/log");
192 (void) symlink("/run/systemd/journal/dev-log", devlog);
235 /* Create the /dev directory if missing. It is more likely to be
241 if (mount(dev, m->path, NULL, MS_MOVE, NULL) < 0) {
246 rmdir(dev);
264 umount(dev);
265 rmdir(dev);
273 char temporary_mount[] = "/tmp/kdbus-dev-XXXXXX";
294 /* create a new /dev/null dev node copy so we have some fodder to
296 if (stat("/dev/null", &st) < 0) {
297 r = log_error_errno(errno, "Failed to stat /dev/null: %m");
477 m->path = prefix_roota(root_directory, "/dev");