Avoid a warning if compiling without inotify

* src/xm_internal.c: split the implementations of xenInotifyActive()
This commit is contained in:
Daniel P. Berrange 2009-08-05 12:04:26 +02:00 committed by Daniel Veillard
parent 3879b33447
commit acec6c3d02
1 changed files with 9 additions and 9 deletions

View File

@ -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,