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

Jincheng Miao jmiao at redhat.com
Tue Jul 15 08:32:01 UTC 2014


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 at redhat.com>
---
 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




More information about the libvir-list mailing list