chiark / gitweb /
util: add delete_chars() call
[elogind.git] / mount-setup.c
index 5a2e89af7c8fa25f456094b090399b5a008f2eeb..18d3911be45e9c8f7db174beccfaf6710b427691 100644 (file)
@@ -39,12 +39,13 @@ enum {
 };
 
 static const char *table[] = {
-        "/proc",  "/proc",         "proc",     "rw",
-        "/sys",   "/sys",          "sysfs",    "rw",
-        "udev",   "/dev",          "devtmpfs", "rw",
-        "tmpfs",  "/dev/shm",      "tmpfs",    "rw",
-        "devpts", "/dev/pts",      "devpts",   "rw",
-        "cgroup", "/cgroup/debug", "cgroup",   "debug",
+        "proc",    "/proc",             "proc",     NULL,
+        "sysfs",   "/sys",              "sysfs",    NULL,
+        "devtmps", "/dev",              "devtmpfs", "mode=755",
+        "tmpfs",   "/dev/shm",          "tmpfs",    "mode=1777",
+        "devpts",  "/dev/pts",          "devpts",   NULL,
+        "cgroup",  "/cgroup/debug",     "cgroup",   "debug",
+        "debugfs", "/sys/kernel/debug", "debugfs",  NULL,
         NULL
 };
 
@@ -85,6 +86,10 @@ static int mount_one(const char *t[]) {
         if (r > 0)
                 return 0;
 
+        /* The access mode here doesn't really matter too much, since
+         * the mounted file system will take precedence anyway. */
+        mkdir(t[MOUNT_WHERE], 0755);
+
         log_debug("Mounting %s to %s of type %s with options %s.",
                   t[MOUNT_WHAT],
                   t[MOUNT_WHERE],