mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
src: Fix return types of .stateInitialize callbacks
The virStateDriver struct has .stateInitialize callback which is declared to return virDrvStateInitResult enum. But some drivers return a plain int in their implementation which is UB. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
7dda4a03ac
commit
66b052263d
@ -1176,7 +1176,7 @@ bhyveStateCleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
bhyveStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -1365,11 +1365,12 @@ static int chStateCleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
static virDrvStateInitResult
|
||||
chStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = VIR_DRV_STATE_INIT_ERROR;
|
||||
int rv;
|
||||
|
@ -86,7 +86,7 @@ virNetcfDriverStateDispose(void *obj)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
netcfStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -1091,7 +1091,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo)
|
||||
static int
|
||||
udevStateCleanup(void);
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
udevStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -645,7 +645,7 @@ libxlAddDom0(libxlDriverPrivate *driver)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
libxlStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -1429,11 +1429,12 @@ lxcSecurityInit(virLXCDriverConfig *cfg)
|
||||
}
|
||||
|
||||
|
||||
static int lxcStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
static virDrvStateInitResult
|
||||
lxcStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virLXCDriverConfig *cfg = NULL;
|
||||
bool autostart = true;
|
||||
|
@ -576,7 +576,7 @@ firewalld_dbus_signal_callback(GDBusConnection *connection G_GNUC_UNUSED,
|
||||
*
|
||||
* Initialization function for the QEMU daemon
|
||||
*/
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
networkStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -2229,7 +2229,7 @@ mdevctlEventHandleCallback(GFileMonitor *monitor G_GNUC_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
nodeStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -208,7 +208,7 @@ nwfilterStateCleanup(void)
|
||||
*
|
||||
* Initialization function for the QEMU daemon
|
||||
*/
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
nwfilterStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -546,7 +546,7 @@ qemuDomainFindMaxID(virDomainObj *vm,
|
||||
*
|
||||
* Initialization function for the QEMU daemon
|
||||
*/
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
qemuStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -174,7 +174,7 @@ static void make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapsho
|
||||
/* Helper functions for remoteOpen. */
|
||||
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
remoteStateInitialize(bool privileged G_GNUC_UNUSED,
|
||||
const char *root G_GNUC_UNUSED,
|
||||
bool monolithic,
|
||||
|
@ -488,7 +488,7 @@ secretStateCleanup(void)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
secretStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -239,7 +239,7 @@ storageDriverAutostart(void)
|
||||
*
|
||||
* Initialization function for the Storage Driver
|
||||
*/
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
storageStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
@ -4068,7 +4068,7 @@ vzStateCleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static virDrvStateInitResult
|
||||
vzStateInitialize(bool privileged,
|
||||
const char *root,
|
||||
bool monolithic G_GNUC_UNUSED,
|
||||
|
Loading…
Reference in New Issue
Block a user