mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 06:25:19 +00:00
libxl: Use consistent style for function definitions
Commit dfa1e1dd added functions whose definitions do not conform to the style used in the libxl driver. Change these functions to be consistent throughout the driver.
This commit is contained in:
parent
687554cd50
commit
130cbf193a
@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Copyright (C) 2006-2012 Red Hat, Inc.
|
/* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||||
* Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
* Copyright (C) 2011-2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
* Copyright (C) 2011 Univention GmbH.
|
* Copyright (C) 2011 Univention GmbH.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -71,15 +71,14 @@ struct libxlOSEventHookTimerInfo {
|
|||||||
int id;
|
int id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void libxlDomainManagedSaveLoad(void *payload,
|
|
||||||
const void *n ATTRIBUTE_UNUSED,
|
|
||||||
void *opaque);
|
|
||||||
|
|
||||||
|
|
||||||
static libxlDriverPrivatePtr libxl_driver = NULL;
|
static libxlDriverPrivatePtr libxl_driver = NULL;
|
||||||
|
|
||||||
/* Function declarations */
|
/* Function declarations */
|
||||||
|
static void
|
||||||
|
libxlDomainManagedSaveLoad(void *payload,
|
||||||
|
const void *n ATTRIBUTE_UNUSED,
|
||||||
|
void *opaque);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
||||||
bool start_paused, int restore_fd);
|
bool start_paused, int restore_fd);
|
||||||
@ -97,11 +96,11 @@ libxlDriverUnlock(libxlDriverPrivatePtr driver)
|
|||||||
virMutexUnlock(&driver->lock);
|
virMutexUnlock(&driver->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
static void libxlFDEventCallback(int watch ATTRIBUTE_UNUSED,
|
libxlFDEventCallback(int watch ATTRIBUTE_UNUSED,
|
||||||
int fd,
|
int fd,
|
||||||
int vir_events,
|
int vir_events,
|
||||||
void *fdinfo)
|
void *fdinfo)
|
||||||
{
|
{
|
||||||
struct libxlOSEventHookFDInfo *info = fdinfo;
|
struct libxlOSEventHookFDInfo *info = fdinfo;
|
||||||
int events = 0;
|
int events = 0;
|
||||||
@ -118,13 +117,15 @@ static void libxlFDEventCallback(int watch ATTRIBUTE_UNUSED,
|
|||||||
libxl_osevent_occurred_fd(info->priv->ctx, info->xl_priv, fd, 0, events);
|
libxl_osevent_occurred_fd(info->priv->ctx, info->xl_priv, fd, 0, events);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libxlFreeFDInfo(void *obj)
|
static void
|
||||||
|
libxlFreeFDInfo(void *obj)
|
||||||
{
|
{
|
||||||
VIR_FREE(obj);
|
VIR_FREE(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libxlFDRegisterEventHook(void *priv, int fd, void **hndp,
|
static int
|
||||||
short events, void *xl_priv)
|
libxlFDRegisterEventHook(void *priv, int fd, void **hndp,
|
||||||
|
short events, void *xl_priv)
|
||||||
{
|
{
|
||||||
int vir_events = VIR_EVENT_HANDLE_ERROR;
|
int vir_events = VIR_EVENT_HANDLE_ERROR;
|
||||||
struct libxlOSEventHookFDInfo *fdinfo;
|
struct libxlOSEventHookFDInfo *fdinfo;
|
||||||
@ -152,10 +153,11 @@ static int libxlFDRegisterEventHook(void *priv, int fd, void **hndp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libxlFDModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
static int
|
||||||
int fd ATTRIBUTE_UNUSED,
|
libxlFDModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
||||||
void **hndp,
|
int fd ATTRIBUTE_UNUSED,
|
||||||
short events)
|
void **hndp,
|
||||||
|
short events)
|
||||||
{
|
{
|
||||||
struct libxlOSEventHookFDInfo *fdinfo = *hndp;
|
struct libxlOSEventHookFDInfo *fdinfo = *hndp;
|
||||||
int vir_events = VIR_EVENT_HANDLE_ERROR;
|
int vir_events = VIR_EVENT_HANDLE_ERROR;
|
||||||
@ -169,32 +171,35 @@ static int libxlFDModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libxlFDDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
|
static void
|
||||||
int fd ATTRIBUTE_UNUSED,
|
libxlFDDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
|
||||||
void *hnd)
|
int fd ATTRIBUTE_UNUSED,
|
||||||
|
void *hnd)
|
||||||
{
|
{
|
||||||
struct libxlOSEventHookFDInfo *fdinfo = hnd;
|
struct libxlOSEventHookFDInfo *fdinfo = hnd;
|
||||||
|
|
||||||
virEventRemoveHandle(fdinfo->watch);
|
virEventRemoveHandle(fdinfo->watch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
static void libxlTimerCallback(int timer ATTRIBUTE_UNUSED, void *timer_v)
|
libxlTimerCallback(int timer ATTRIBUTE_UNUSED, void *timer_v)
|
||||||
{
|
{
|
||||||
struct libxlOSEventHookTimerInfo *timer_info = timer_v;
|
struct libxlOSEventHookTimerInfo *timer_info = timer_v;
|
||||||
|
|
||||||
libxl_osevent_occurred_timeout(timer_info->priv->ctx, timer_info->xl_priv);
|
libxl_osevent_occurred_timeout(timer_info->priv->ctx, timer_info->xl_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libxlTimerInfoFree(void* obj)
|
static void
|
||||||
|
libxlTimerInfoFree(void* obj)
|
||||||
{
|
{
|
||||||
VIR_FREE(obj);
|
VIR_FREE(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libxlTimeoutRegisterEventHook(void *priv,
|
static int
|
||||||
void **hndp,
|
libxlTimeoutRegisterEventHook(void *priv,
|
||||||
struct timeval abs_t,
|
void **hndp,
|
||||||
void *for_libxl)
|
struct timeval abs_t,
|
||||||
|
void *for_libxl)
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
struct libxlOSEventHookTimerInfo *timer_info;
|
struct libxlOSEventHookTimerInfo *timer_info;
|
||||||
@ -222,9 +227,10 @@ static int libxlTimeoutRegisterEventHook(void *priv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
static int
|
||||||
void **hndp,
|
libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
||||||
struct timeval abs_t)
|
void **hndp,
|
||||||
|
struct timeval abs_t)
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
int timeout;
|
int timeout;
|
||||||
@ -237,8 +243,9 @@ static int libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libxlTimeoutDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
|
static void
|
||||||
void *hnd)
|
libxlTimeoutDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
|
||||||
|
void *hnd)
|
||||||
{
|
{
|
||||||
struct libxlOSEventHookTimerInfo *timer_info = hnd;
|
struct libxlOSEventHookTimerInfo *timer_info = hnd;
|
||||||
|
|
||||||
@ -283,7 +290,6 @@ libxlDomainObjPrivateFree(void *data)
|
|||||||
VIR_FREE(priv);
|
VIR_FREE(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* driver must be locked before calling */
|
/* driver must be locked before calling */
|
||||||
static void
|
static void
|
||||||
libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)
|
libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)
|
||||||
@ -521,7 +527,8 @@ libxlVmReap(libxlDriverPrivatePtr driver,
|
|||||||
/*
|
/*
|
||||||
* Handle previously registered event notification from libxenlight
|
* Handle previously registered event notification from libxenlight
|
||||||
*/
|
*/
|
||||||
static void libxlEventHandler(void *data, const libxl_event *event)
|
static void
|
||||||
|
libxlEventHandler(void *data, const libxl_event *event)
|
||||||
{
|
{
|
||||||
libxlDriverPrivatePtr driver = libxl_driver;
|
libxlDriverPrivatePtr driver = libxl_driver;
|
||||||
virDomainObjPtr vm = data;
|
virDomainObjPtr vm = data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user