]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: non-functional changes
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 28 Apr 2017 21:54:24 +0000 (23:54 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 28 Apr 2017 22:05:29 +0000 (00:05 +0200)
Closes #1475.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c
src/lxc/utils.c
src/lxc/utils.h

index eb92b5cd4ef975b9d6f607bd376f798ef02ed60b..5d47406977119c0f2138977ccb036c707a96191b 100644 (file)
@@ -3760,20 +3760,21 @@ int ttys_shift_ids(struct lxc_conf *c)
        return 0;
 }
 
-/* NOTE: not to be called from inside the container namespace! */
-int tmp_proc_mount(struct lxc_conf *lxc_conf)
+/* NOTE: Must not be called from inside the container namespace! */
+int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
 {
        int mounted;
 
-       mounted = mount_proc_if_needed(lxc_conf->rootfs.path ? lxc_conf->rootfs.mount : "");
+       mounted = lxc_mount_proc_if_needed(conf->rootfs.path ? conf->rootfs.mount : "");
        if (mounted == -1) {
-               SYSERROR("failed to mount /proc in the container.");
+               SYSERROR("failed to mount /proc in the container");
                /* continue only if there is no rootfs */
-               if (lxc_conf->rootfs.path)
+               if (conf->rootfs.path)
                        return -1;
        } else if (mounted == 1) {
-               lxc_conf->tmp_umount_proc = 1;
+               conf->tmp_umount_proc = 1;
        }
+
        return 0;
 }
 
@@ -4063,7 +4064,7 @@ int lxc_setup(struct lxc_handler *handler)
        }
 
        /* mount /proc if it's not already there */
-       if (tmp_proc_mount(lxc_conf) < 0) {
+       if (lxc_create_tmp_proc_mount(lxc_conf) < 0) {
                ERROR("failed to LSM mount proc for '%s'", name);
                return -1;
        }
index d83e294fae12b74361e31e1ad8d03be705c2b26a..03386dd737273660042680eeafa3c672bbac8c4e 100644 (file)
@@ -1754,7 +1754,7 @@ int safe_mount(const char *src, const char *dest, const char *fstype,
  *
  * NOTE: not to be called from inside the container namespace!
  */
-int mount_proc_if_needed(const char *rootfs)
+int lxc_mount_proc_if_needed(const char *rootfs)
 {
        char path[MAXPATHLEN];
        char link[20];
index b6fc7c5fa7672f5fdb13b362388ed5858f7c83fe..161788f9891b95546a3e66dba9336c70016452c0 100644 (file)
@@ -326,7 +326,7 @@ char *get_template_path(const char *t);
 int setproctitle(char *title);
 int safe_mount(const char *src, const char *dest, const char *fstype,
                unsigned long flags, const void *data, const char *rootfs);
-int mount_proc_if_needed(const char *rootfs);
+int lxc_mount_proc_if_needed(const char *rootfs);
 int open_devnull(void);
 int set_stdfds(int fd);
 int null_stdfds(void);