From: Christian Brauner Date: Wed, 22 Jul 2020 09:47:21 +0000 (+0200) Subject: attach: use new mount api X-Git-Tag: lxc-5.0.0~383^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=657256e0b86b63e1f14f1ae10356e329d749b25f;p=thirdparty%2Flxc.git attach: use new mount api Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 5443fee5f..ad25aada9 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -39,6 +39,7 @@ #include "macro.h" #include "mainloop.h" #include "memory_utils.h" +#include "mount_utils.h" #include "namespace.h" #include "process_utils.h" #include "syscall_wrappers.h" @@ -202,7 +203,7 @@ int lxc_attach_remount_sys_proc(void) if (ret < 0) return log_error_errno(-1, errno, "Failed to unmount /proc"); - ret = mount("none", "/proc", "proc", 0, NULL); + ret = mount_filesystem("proc", "/proc", 0); if (ret < 0) return log_error_errno(-1, errno, "Failed to remount /proc"); @@ -215,7 +216,7 @@ int lxc_attach_remount_sys_proc(void) return log_error_errno(-1, errno, "Failed to unmount /sys"); /* Remount it. */ - if (ret == 0 && mount("none", "/sys", "sysfs", 0, NULL)) + if (ret == 0 && mount_filesystem("sysfs", "/sys", 0)) return log_error_errno(-1, errno, "Failed to remount /sys"); return 0;