mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
Replace use of vboxError with virReportError
Update the VirtualBox driver to use virReportError instead of the vboxError custom macro Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
bd7c36c57e
commit
51f6e5a6ef
1
cfg.mk
1
cfg.mk
@ -523,7 +523,6 @@ msg_gen_function += statsError
|
|||||||
msg_gen_function += streamsReportError
|
msg_gen_function += streamsReportError
|
||||||
msg_gen_function += vah_error
|
msg_gen_function += vah_error
|
||||||
msg_gen_function += vah_warning
|
msg_gen_function += vah_warning
|
||||||
msg_gen_function += vboxError
|
|
||||||
msg_gen_function += virConfError
|
msg_gen_function += virConfError
|
||||||
msg_gen_function += virCPUReportError
|
msg_gen_function += virCPUReportError
|
||||||
msg_gen_function += virGenericReportError
|
msg_gen_function += virGenericReportError
|
||||||
|
@ -68,10 +68,6 @@ static virDriver vboxDriverDummy;
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_VBOX
|
#define VIR_FROM_THIS VIR_FROM_VBOX
|
||||||
|
|
||||||
#define vboxError(code, ...) \
|
|
||||||
virReportErrorHelper(VIR_FROM_VBOX, code, __FILE__, \
|
|
||||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
|
||||||
|
|
||||||
int vboxRegister(void) {
|
int vboxRegister(void) {
|
||||||
virDriverPtr driver;
|
virDriverPtr driver;
|
||||||
virNetworkDriverPtr networkDriver;
|
virNetworkDriverPtr networkDriver;
|
||||||
@ -162,28 +158,28 @@ static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
|
|||||||
return VIR_DRV_OPEN_DECLINED;
|
return VIR_DRV_OPEN_DECLINED;
|
||||||
|
|
||||||
if (conn->uri->path == NULL || STREQ(conn->uri->path, "")) {
|
if (conn->uri->path == NULL || STREQ(conn->uri->path, "")) {
|
||||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("no VirtualBox driver path specified (try vbox:///session)"));
|
_("no VirtualBox driver path specified (try vbox:///session)"));
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uid != 0) {
|
if (uid != 0) {
|
||||||
if (STRNEQ (conn->uri->path, "/session")) {
|
if (STRNEQ (conn->uri->path, "/session")) {
|
||||||
vboxError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unknown driver path '%s' specified (try vbox:///session)"), conn->uri->path);
|
_("unknown driver path '%s' specified (try vbox:///session)"), conn->uri->path);
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
} else { /* root */
|
} else { /* root */
|
||||||
if (STRNEQ (conn->uri->path, "/system") &&
|
if (STRNEQ (conn->uri->path, "/system") &&
|
||||||
STRNEQ (conn->uri->path, "/session")) {
|
STRNEQ (conn->uri->path, "/session")) {
|
||||||
vboxError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unknown driver path '%s' specified (try vbox:///system)"), conn->uri->path);
|
_("unknown driver path '%s' specified (try vbox:///system)"), conn->uri->path);
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("unable to initialize VirtualBox driver API"));
|
_("unable to initialize VirtualBox driver API"));
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user