mirror of https://gitee.com/openkylin/libvirt.git
Avoid a warning if compiling without inotify
* src/xm_internal.c: split the implementations of xenInotifyActive()
This commit is contained in:
parent
3879b33447
commit
acec6c3d02
|
@ -122,18 +122,18 @@ struct xenUnifiedDriver xenXMDriver = {
|
||||||
virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \
|
virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, fmt)
|
||||||
|
|
||||||
|
#ifndef WITH_XEN_INOTIFY
|
||||||
|
static int xenInotifyActive(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
static int xenInotifyActive(virConnectPtr conn)
|
static int xenInotifyActive(virConnectPtr conn)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
#ifndef WITH_XEN_INOTIFY
|
|
||||||
ret = 0;
|
|
||||||
#else
|
|
||||||
xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData;
|
xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData;
|
||||||
ret = (priv->inotifyWatch > 0);
|
return priv->inotifyWatch > 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Convenience method to grab a int from the config file object */
|
/* Convenience method to grab a int from the config file object */
|
||||||
static int xenXMConfigGetBool(virConnectPtr conn,
|
static int xenXMConfigGetBool(virConnectPtr conn,
|
||||||
|
|
Loading…
Reference in New Issue