mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
bhyveStateInitialize(bool privileged,
|
bhyveStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -1365,7 +1365,8 @@ static int chStateCleanup(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int chStateInitialize(bool privileged,
|
static virDrvStateInitResult
|
||||||
|
chStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||||
|
@ -86,7 +86,7 @@ virNetcfDriverStateDispose(void *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
netcfStateInitialize(bool privileged,
|
netcfStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -1091,7 +1091,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo)
|
|||||||
static int
|
static int
|
||||||
udevStateCleanup(void);
|
udevStateCleanup(void);
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
udevStateInitialize(bool privileged,
|
udevStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -645,7 +645,7 @@ libxlAddDom0(libxlDriverPrivate *driver)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
libxlStateInitialize(bool privileged,
|
libxlStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -1429,7 +1429,8 @@ lxcSecurityInit(virLXCDriverConfig *cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int lxcStateInitialize(bool privileged,
|
static virDrvStateInitResult
|
||||||
|
lxcStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||||
|
@ -576,7 +576,7 @@ firewalld_dbus_signal_callback(GDBusConnection *connection G_GNUC_UNUSED,
|
|||||||
*
|
*
|
||||||
* Initialization function for the QEMU daemon
|
* Initialization function for the QEMU daemon
|
||||||
*/
|
*/
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
networkStateInitialize(bool privileged,
|
networkStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -2229,7 +2229,7 @@ mdevctlEventHandleCallback(GFileMonitor *monitor G_GNUC_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
nodeStateInitialize(bool privileged,
|
nodeStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -208,7 +208,7 @@ nwfilterStateCleanup(void)
|
|||||||
*
|
*
|
||||||
* Initialization function for the QEMU daemon
|
* Initialization function for the QEMU daemon
|
||||||
*/
|
*/
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
nwfilterStateInitialize(bool privileged,
|
nwfilterStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -546,7 +546,7 @@ qemuDomainFindMaxID(virDomainObj *vm,
|
|||||||
*
|
*
|
||||||
* Initialization function for the QEMU daemon
|
* Initialization function for the QEMU daemon
|
||||||
*/
|
*/
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
qemuStateInitialize(bool privileged,
|
qemuStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -174,7 +174,7 @@ static void make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapsho
|
|||||||
/* Helper functions for remoteOpen. */
|
/* Helper functions for remoteOpen. */
|
||||||
|
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
remoteStateInitialize(bool privileged G_GNUC_UNUSED,
|
remoteStateInitialize(bool privileged G_GNUC_UNUSED,
|
||||||
const char *root G_GNUC_UNUSED,
|
const char *root G_GNUC_UNUSED,
|
||||||
bool monolithic,
|
bool monolithic,
|
||||||
|
@ -488,7 +488,7 @@ secretStateCleanup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
secretStateInitialize(bool privileged,
|
secretStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -239,7 +239,7 @@ storageDriverAutostart(void)
|
|||||||
*
|
*
|
||||||
* Initialization function for the Storage Driver
|
* Initialization function for the Storage Driver
|
||||||
*/
|
*/
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
storageStateInitialize(bool privileged,
|
storageStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
@ -4068,7 +4068,7 @@ vzStateCleanup(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static virDrvStateInitResult
|
||||||
vzStateInitialize(bool privileged,
|
vzStateInitialize(bool privileged,
|
||||||
const char *root,
|
const char *root,
|
||||||
bool monolithic G_GNUC_UNUSED,
|
bool monolithic G_GNUC_UNUSED,
|
||||||
|
Loading…
Reference in New Issue
Block a user