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;
}
}
/* 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;
}
*
* 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];
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);