[PATCH 2/4] lxc: print ENOTSUP when usernamespace is not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In lxcContainerStart, when user namespace is not supported,
the virReportSystemError is called. But the first argument
should be ENOTSUPP, instead of VIR_ERR_CONFIG_UNSUPPORTED.

Signed-off-by: Jincheng Miao <jmiao@xxxxxxxxxx>
---
 src/lxc/lxc_container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 4d89677..343df47 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -2020,7 +2020,7 @@ int lxcContainerStart(virDomainDefPtr def,
             VIR_DEBUG("Enable user namespace");
             cflags |= CLONE_NEWUSER;
         } else {
-            virReportSystemError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+            virReportSystemError(ENOTSUP, "%s",
                                  _("Kernel doesn't support user namespace"));
             VIR_FREE(stack);
             return -1;
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]