mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
vbox: Remove virConnectPtr from vboxError
This commit is contained in:
parent
1c91a0b44e
commit
a3884f8705
@ -58,8 +58,8 @@ static virDriver vboxDriverDummy;
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_VBOX
|
||||
|
||||
#define vboxError(conn, code, ...) \
|
||||
virReportErrorHelper(conn, VIR_FROM_VBOX, code, __FILE__, \
|
||||
#define vboxError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_VBOX, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
int vboxRegister(void) {
|
||||
@ -136,27 +136,27 @@ static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
|
||||
return VIR_DRV_OPEN_DECLINED;
|
||||
|
||||
if (conn->uri->path == NULL || STREQ(conn->uri->path, "")) {
|
||||
vboxError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("no VirtualBox driver path specified (try vbox:///session)"));
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
}
|
||||
|
||||
if (uid != 0) {
|
||||
if (STRNEQ (conn->uri->path, "/session")) {
|
||||
vboxError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown driver path '%s' specified (try vbox:///session)"), conn->uri->path);
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
}
|
||||
} else { /* root */
|
||||
if (STRNEQ (conn->uri->path, "/system") &&
|
||||
STRNEQ (conn->uri->path, "/session")) {
|
||||
vboxError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown driver path '%s' specified (try vbox:///system)"), conn->uri->path);
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
vboxError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("unable to initialize VirtualBox driver API"));
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user