[libvirt] [PATCH] lxc: return the right value if failed to make path
Chen Hanxiao
chenhanxiao at cn.fujitsu.com
Fri Dec 6 06:20:21 UTC 2013
From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
If we failed to make path for pts,
lxcContainerMountFSDevPTS will return the value
virAsprintf returned rather than -1.
Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.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 b1b63fb..2835463 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -952,7 +952,7 @@ static int lxcContainerMountFSDevPTS(virDomainDefPtr def,
def->name)) < 0)
return ret;
- if (virFileMakePath("/dev/pts") < 0) {
+ if ((ret = virFileMakePath("/dev/pts")) < 0) {
virReportSystemError(errno, "%s",
_("Cannot create /dev/pts"));
goto cleanup;
--
1.8.2.1
More information about the libvir-list
mailing list