#include <stdlib.h>
#include "init.h"
+#include "../libc-compat.h"
static void
early_dev(void)
mount("sysfs", "/sys", "sysfs", MS_NOATIME | MS_NODEV | MS_NOEXEC | MS_NOSUID, 0);
mount("cgroup", "/sys/fs/cgroup", "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID, 0);
mount("tmpfs", "/dev", "tmpfs", MS_NOATIME | MS_NOSUID, "mode=0755,size=512K");
- symlink("/tmp/shm", "/dev/shm");
+ ignore(symlink("/tmp/shm", "/dev/shm"));
mkdir("/dev/pts", 0755);
mount("devpts", "/dev/pts", "devpts", MS_NOATIME | MS_NOEXEC | MS_NOSUID, "mode=600");
early_dev();
--- /dev/null
+#ifndef __PROCD_LIBC_COMPAT_H
+#define __PROCD_LIBC_COMPAT_H
+
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
+static inline int ignore(int x) {return x;}
+#else
+#define ignore(x) x
+#endif
+
+#endif
#include <unistd.h>
#include "../procd.h"
+#include "../libc-compat.h"
#include "hotplug.h"
umount2("/dev/pts", MNT_DETACH);
umount2("/dev/", MNT_DETACH);
mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755,size=512K");
- symlink("/tmp/shm", "/dev/shm");
+ ignore(symlink("/tmp/shm", "/dev/shm"));
mkdir("/dev/pts", 0755);
umask(oldumask);
mount("devpts", "/dev/pts", "devpts", MS_NOEXEC | MS_NOSUID, 0);