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

Remove virConnectPtr from LXC driver

上级 caa805ea
......@@ -63,8 +63,8 @@ struct __lxc_driver {
int lxcLoadDriverConfig(lxc_driver_t *driver);
virCapsPtr lxcCapsInit(void);
#define lxcError(conn, dom, code, fmt...) \
virReportErrorHelper(conn, VIR_FROM_LXC, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
#define lxcError(code, fmt...) \
virReportErrorHelper(NULL, VIR_FROM_LXC, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
#endif /* LXC_CONF_H */
......@@ -684,13 +684,13 @@ static int lxcContainerDropCapabilities(void)
CAP_AUDIT_CONTROL, /* No messing with auditing status */
CAP_MAC_ADMIN, /* No messing with LSM config */
-1 /* sentinal */)) < 0) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("Failed to remove capabilities: %d"), ret);
return -1;
}
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("Failed to apply capabilities: %d"), ret);
return -1;
}
......@@ -729,7 +729,7 @@ static int lxcContainerChild( void *data )
virDomainFSDefPtr root;
if (NULL == vmDef) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
"%s", _("lxcChild() passed invalid vm definition"));
return -1;
}
......
......@@ -179,7 +179,7 @@ static int lxcMonitorServer(const char *sockpath)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
if (virStrcpyStatic(addr.sun_path, sockpath) == NULL) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("Socket path %s too long for destination"), sockpath);
goto error;
}
......@@ -253,7 +253,7 @@ static int lxcControllerClearCapabilities(void)
capng_clear(CAPNG_SELECT_BOTH);
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("failed to apply capabilities: %d"), ret);
return -1;
}
......@@ -380,7 +380,7 @@ static int lxcControllerMain(int monitor,
DEBUG("EPOLLHUP from fd %d", epollEvent.data.fd);
continue;
} else {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("error event %d"), epollEvent.events);
goto cleanup;
}
......@@ -451,7 +451,7 @@ static int lxcControllerMoveInterfaces(unsigned int nveths,
unsigned int i;
for (i = 0 ; i < nveths ; i++)
if (moveInterfaceToNetNs(veths[i], container) < 0) {
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("Failed to move interface %s to ns %d"),
veths[i], container);
return -1;
......@@ -476,7 +476,7 @@ static int lxcControllerCleanupInterfaces(unsigned int nveths,
unsigned int i;
for (i = 0 ; i < nveths ; i++)
if (vethDelete(veths[i]) < 0)
lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR,
lxcError(VIR_ERR_INTERNAL_ERROR,
_("Failed to delete veth: %s"), veths[i]);
/* will continue to try to cleanup any other interfaces */
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册