[systemd-commits] src/mount.c src/mount-setup.c src/mount-setup.h src/umount.c
Kay Sievers
kay at kemper.freedesktop.org
Thu Nov 11 02:17:48 PST 2010
src/mount-setup.c | 8 +++++++-
src/mount-setup.h | 1 +
src/mount.c | 2 ++
src/umount.c | 2 +-
4 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 57f2a956e63d6b981b9d6277ab800ad4ad386f42
Author: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu Nov 11 11:15:16 2010 +0100
split mount_point_is_api() and mount_point_ignore()
We should not handle the ignore list as API mounts, as
systemd itself never touches them.
On Thu, Nov 11, 2010 at 10:34, Andreas Jaeger <aj at novell.com> wrote:
>
> I noticed for some time that systemd-remount-api-vfs is in the
> failed state and found now the following in the log files
>
> systemd-remount-api-vfs[467]: /bin/mount for /proc/bus/usb exited with exit status 32.
> systemd-remount-api-vfs[467]: mount: /proc/bus/usb not mounted already, or bad option
> systemd[1]: systemd-remount-api-vfs.service: main process exited, code=exited, status=1
> systemd[1]: Unit systemd-remount-api-vfs.service entered failed state.
diff --git a/src/mount-setup.c b/src/mount-setup.c
index 84a729e..9eb2832 100644
--- a/src/mount-setup.c
+++ b/src/mount-setup.c
@@ -74,11 +74,17 @@ bool mount_point_is_api(const char *path) {
if (path_equal(path, mount_table[i].where))
return true;
+ return path_startswith(path, "/sys/fs/cgroup/");
+}
+
+bool mount_point_ignore(const char *path) {
+ unsigned i;
+
for (i = 0; i < ELEMENTSOF(ignore_paths); i++)
if (path_equal(path, ignore_paths[i]))
return true;
- return path_startswith(path, "/sys/fs/cgroup/");
+ return false;
}
static int mount_one(const MountPoint *p) {
diff --git a/src/mount-setup.h b/src/mount-setup.h
index 47d0e5b..150ec40 100644
--- a/src/mount-setup.h
+++ b/src/mount-setup.h
@@ -27,5 +27,6 @@
int mount_setup(void);
bool mount_point_is_api(const char *path);
+bool mount_point_ignore(const char *path);
#endif
diff --git a/src/mount.c b/src/mount.c
index 5d4944a..4094eef 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1213,6 +1213,8 @@ static int mount_add_one(
* dependencies ever. */
if (mount_point_is_api(where))
return 0;
+ if (mount_point_ignore(where))
+ return 0;
if (streq(fstype, "autofs"))
return 0;
diff --git a/src/umount.c b/src/umount.c
index 0081d97..2ae8f86 100644
--- a/src/umount.c
+++ b/src/umount.c
@@ -105,7 +105,7 @@ static int mount_points_list_get(MountPoint **head) {
goto finish;
}
- if (mount_point_is_api(p)) {
+ if (mount_point_is_api(p) || mount_point_ignore(p)) {
free(p);
continue;
}
More information about the systemd-commits
mailing list