conf: virdomainobjlist: Convert header to contemporary style

Use the new style which doesn't require re-aligning the argument list
once you change the return type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2022-08-04 15:25:08 +02:00
parent 0cd318ce16
commit f52bc2d54a

View File

@ -26,72 +26,85 @@
typedef struct _virDomainObjList virDomainObjList; typedef struct _virDomainObjList virDomainObjList;
virDomainObjList *virDomainObjListNew(void); virDomainObjList *
virDomainObjListNew(void);
virDomainObj *virDomainObjListFindByID(virDomainObjList *doms, virDomainObj *
int id); virDomainObjListFindByID(virDomainObjList *doms,
virDomainObj *virDomainObjListFindByUUID(virDomainObjList *doms, int id);
const unsigned char *uuid); virDomainObj *
virDomainObj *virDomainObjListFindByName(virDomainObjList *doms, virDomainObjListFindByUUID(virDomainObjList *doms,
const char *name); const unsigned char *uuid);
virDomainObj *
virDomainObjListFindByName(virDomainObjList *doms,
const char *name);
enum { enum {
VIR_DOMAIN_OBJ_LIST_ADD_LIVE = (1 << 0), VIR_DOMAIN_OBJ_LIST_ADD_LIVE = (1 << 0),
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE = (1 << 1), VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE = (1 << 1),
}; };
virDomainObj *virDomainObjListAdd(virDomainObjList *doms, virDomainObj *
virDomainDef **def, virDomainObjListAdd(virDomainObjList *doms,
virDomainXMLOption *xmlopt, virDomainDef **def,
unsigned int flags, virDomainXMLOption *xmlopt,
virDomainDef **oldDef); unsigned int flags,
virDomainDef **oldDef);
typedef int (*virDomainObjListRenameCallback)(virDomainObj *dom, typedef int (*virDomainObjListRenameCallback)(virDomainObj *dom,
const char *new_name, const char *new_name,
unsigned int flags, unsigned int flags,
void *opaque); void *opaque);
int virDomainObjListRename(virDomainObjList *doms, int
virDomainObj *dom, virDomainObjListRename(virDomainObjList *doms,
const char *new_name, virDomainObj *dom,
unsigned int flags, const char *new_name,
virDomainObjListRenameCallback callback, unsigned int flags,
void *opaque); virDomainObjListRenameCallback callback,
void *opaque);
void virDomainObjListRemove(virDomainObjList *doms, void
virDomainObj *dom); virDomainObjListRemove(virDomainObjList *doms,
void virDomainObjListRemoveLocked(virDomainObjList *doms, virDomainObj *dom);
virDomainObj *dom); void
virDomainObjListRemoveLocked(virDomainObjList *doms,
virDomainObj *dom);
int virDomainObjListLoadAllConfigs(virDomainObjList *doms, int
const char *configDir, virDomainObjListLoadAllConfigs(virDomainObjList *doms,
const char *autostartDir, const char *configDir,
bool liveStatus, const char *autostartDir,
virDomainXMLOption *xmlopt, bool liveStatus,
virDomainLoadConfigNotify notify, virDomainXMLOption *xmlopt,
void *opaque); virDomainLoadConfigNotify notify,
void *opaque);
int virDomainObjListNumOfDomains(virDomainObjList *doms, int
bool active, virDomainObjListNumOfDomains(virDomainObjList *doms,
bool active,
virDomainObjListACLFilter filter,
virConnectPtr conn);
int
virDomainObjListGetActiveIDs(virDomainObjList *doms,
int *ids,
int maxids,
virDomainObjListACLFilter filter,
virConnectPtr conn);
int
virDomainObjListGetInactiveNames(virDomainObjList *doms,
char **const names,
int maxnames,
virDomainObjListACLFilter filter, virDomainObjListACLFilter filter,
virConnectPtr conn); virConnectPtr conn);
int virDomainObjListGetActiveIDs(virDomainObjList *doms,
int *ids,
int maxids,
virDomainObjListACLFilter filter,
virConnectPtr conn);
int virDomainObjListGetInactiveNames(virDomainObjList *doms,
char **const names,
int maxnames,
virDomainObjListACLFilter filter,
virConnectPtr conn);
typedef int (*virDomainObjListIterator)(virDomainObj *dom, typedef int (*virDomainObjListIterator)(virDomainObj *dom,
void *opaque); void *opaque);
int virDomainObjListForEach(virDomainObjList *doms, int
bool modify, virDomainObjListForEach(virDomainObjList *doms,
virDomainObjListIterator callback, bool modify,
void *opaque); virDomainObjListIterator callback,
void *opaque);
#define VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE \ #define VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE \
(VIR_CONNECT_LIST_DOMAINS_ACTIVE | \ (VIR_CONNECT_LIST_DOMAINS_ACTIVE | \
@ -132,23 +145,26 @@ int virDomainObjListForEach(virDomainObjList *doms,
VIR_CONNECT_LIST_DOMAINS_FILTERS_SNAPSHOT | \ VIR_CONNECT_LIST_DOMAINS_FILTERS_SNAPSHOT | \
VIR_CONNECT_LIST_DOMAINS_FILTERS_CHECKPOINT) VIR_CONNECT_LIST_DOMAINS_FILTERS_CHECKPOINT)
int virDomainObjListCollect(virDomainObjList *doms, int
virConnectPtr conn, virDomainObjListCollect(virDomainObjList *doms,
virDomainObj ***vms, virConnectPtr conn,
size_t *nvms, virDomainObj ***vms,
virDomainObjListACLFilter filter, size_t *nvms,
unsigned int flags); virDomainObjListACLFilter filter,
int virDomainObjListExport(virDomainObjList *doms, unsigned int flags);
virConnectPtr conn, int
virDomainPtr **domains, virDomainObjListExport(virDomainObjList *doms,
virDomainObjListACLFilter filter, virConnectPtr conn,
unsigned int flags); virDomainPtr **domains,
int virDomainObjListConvert(virDomainObjList *domlist, virDomainObjListACLFilter filter,
virConnectPtr conn, unsigned int flags);
virDomainPtr *doms, int
size_t ndoms, virDomainObjListConvert(virDomainObjList *domlist,
virDomainObj ***vms, virConnectPtr conn,
size_t *nvms, virDomainPtr *doms,
virDomainObjListACLFilter filter, size_t ndoms,
unsigned int flags, virDomainObj ***vms,
bool skip_missing); size_t *nvms,
virDomainObjListACLFilter filter,
unsigned int flags,
bool skip_missing);