mount: create directory before adding watches on it
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Nov 2014 18:43:09 +0000 (13:43 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Nov 2014 19:30:50 +0000 (14:30 -0500)
src/core/mount.c

index 679d15c..61bc3e3 100644 (file)
@@ -1624,6 +1624,8 @@ static int mount_enumerate(Manager *m) {
                 if (m->utab_inotify_fd < 0)
                         goto fail_with_errno;
 
+                (void) mkdir_p_label("/run/mount", 0755);
+
                 r = inotify_add_watch(m->utab_inotify_fd, "/run/mount", IN_MOVED_TO);
                 if (r < 0)
                         goto fail_with_errno;