mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
541a761bc9
commit
558546fb8f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user