提交 01100c7f 编写于 作者: D Daniel P. Berrange

Ensure lxcContainerResolveSymlinks reports errors

The lxcContainerResolveSymlinks method merely logged some errors
as debug messages, rather than reporting them as proper errors.
This meant startup failures were not diagnosed at all.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 558546fb
......@@ -1697,7 +1697,6 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef)
{
char *newroot;
size_t i;
char ebuf[1024];
VIR_DEBUG("Resolving symlinks");
......@@ -1707,14 +1706,16 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef)
continue;
if (access(fs->src, F_OK)) {
VIR_DEBUG("Failed to access '%s': %s", fs->src,
virStrerror(errno, ebuf, sizeof(ebuf)));
virReportSystemError(errno,
_("Failed to access '%s'"), fs->src);
return -1;
}
VIR_DEBUG("Resolving '%s'", fs->src);
if (virFileResolveAllLinks(fs->src, &newroot) < 0) {
VIR_DEBUG("Failed to resolve symlink at %s", fs->src);
virReportSystemError(errno,
_("Failed to resolve symlink at %s"),
fs->src);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册