From 75f86906c52735c98dc0aa7e24b773edb42ee814 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 7 Sep 2015 13:42:47 +0200 Subject: basic: rework virtualization detection API Introduce a proper enum, and don't pass around string ids anymore. This simplifies things quite a bit, and makes virtualization detection more similar to architecture detection. --- src/core/mount-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/mount-setup.c') diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index c6f3569915..e84f80b61b 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -164,7 +164,7 @@ static int mount_one(const MountPoint *p, bool relabel) { return 0; /* Skip securityfs in a container */ - if (!(p->mode & MNT_IN_CONTAINER) && detect_container(NULL) > 0) + if (!(p->mode & MNT_IN_CONTAINER) && detect_container() > 0) return 0; /* The access mode here doesn't really matter too much, since @@ -385,7 +385,7 @@ int mount_setup(bool loaded_policy) { * nspawn and the container tools work out of the box. If * specific setups need other settings they can reset the * propagation mode to private if needed. */ - if (detect_container(NULL) <= 0) + if (detect_container() <= 0) if (mount(NULL, "/", NULL, MS_REC|MS_SHARED, NULL) < 0) log_warning_errno(errno, "Failed to set up the root directory for shared mount propagation: %m"); -- cgit v1.2.3-54-g00ecf