提交 558546fb 编写于 作者: D Daniel P. Berrange

Ensure lxcContainerMain reports errors on stderr

Ensure the lxcContainerMain method reports any errors that
occur during setup to stderr, where libvirtd will pick them
up.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 541a761b
......@@ -1905,6 +1905,15 @@ cleanup:
ret = virCommandExec(cmd);
}
if (ret != 0) {
virErrorPtr err = virGetLastError();
if (err && err->message)
fprintf(stderr, "%s\n", err->message);
else
fprintf(stderr, "%s\n",
_("Unknown failure in libvirt_lxc startup"));
}
virCommandFree(cmd);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册