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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-10-14 13:04:50 +01:00
parent 541a761bc9
commit 558546fb8f

View File

@ -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;
}