mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03: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 += vah_error
|
||||
msg_gen_function += vah_warning
|
||||
msg_gen_function += vboxError
|
||||
msg_gen_function += virConfError
|
||||
msg_gen_function += virCPUReportError
|
||||
msg_gen_function += virGenericReportError
|
||||
|
@ -68,10 +68,6 @@ static virDriver vboxDriverDummy;
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_VBOX
|
||||
|
||||
#define vboxError(code, ...) \
|
||||
virReportErrorHelper(VIR_FROM_VBOX, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
int vboxRegister(void) {
|
||||
virDriverPtr driver;
|
||||
virNetworkDriverPtr networkDriver;
|
||||
@ -162,28 +158,28 @@ static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
|
||||
return VIR_DRV_OPEN_DECLINED;
|
||||
|
||||
if (conn->uri->path == NULL || STREQ(conn->uri->path, "")) {
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("no VirtualBox driver path specified (try vbox:///session)"));
|
||||
virReportError(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(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown driver path '%s' specified (try vbox:///session)"), conn->uri->path);
|
||||
virReportError(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(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown driver path '%s' specified (try vbox:///system)"), conn->uri->path);
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unknown driver path '%s' specified (try vbox:///system)"), conn->uri->path);
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
vboxError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("unable to initialize VirtualBox driver API"));
|
||||
virReportError(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