mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
util: cgroup: use #pragma once in headers
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
65d6a1df03
commit
9f34408270
@ -19,12 +19,11 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRCGROUP_H
|
||||
# define LIBVIRT_VIRCGROUP_H
|
||||
#pragma once
|
||||
|
||||
# include "virutil.h"
|
||||
# include "virbitmap.h"
|
||||
# include "virenum.h"
|
||||
#include "virutil.h"
|
||||
#include "virbitmap.h"
|
||||
#include "virenum.h"
|
||||
|
||||
struct _virCgroup;
|
||||
typedef struct _virCgroup virCgroup;
|
||||
@ -285,4 +284,3 @@ int virCgroupSetOwner(virCgroupPtr cgroup,
|
||||
int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller);
|
||||
|
||||
bool virCgroupControllerAvailable(int controller);
|
||||
#endif /* LIBVIRT_VIRCGROUP_H */
|
||||
|
@ -18,15 +18,14 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRCGROUPBACKEND_H
|
||||
# define LIBVIRT_VIRCGROUPBACKEND_H
|
||||
#pragma once
|
||||
|
||||
# include "internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
# include "vircgroup.h"
|
||||
# include "virhash.h"
|
||||
#include "vircgroup.h"
|
||||
#include "virhash.h"
|
||||
|
||||
# define CGROUP_MAX_VAL 512
|
||||
#define CGROUP_MAX_VAL 512
|
||||
|
||||
typedef enum {
|
||||
VIR_CGROUP_NONE = 0, /* create subdir under each cgroup if possible. */
|
||||
@ -447,7 +446,7 @@ virCgroupBackendPtr
|
||||
virCgroupBackendForController(virCgroupPtr group,
|
||||
unsigned int controller);
|
||||
|
||||
# define VIR_CGROUP_BACKEND_CALL(group, controller, func, ret, ...) \
|
||||
#define VIR_CGROUP_BACKEND_CALL(group, controller, func, ret, ...) \
|
||||
virCgroupBackendPtr backend = virCgroupBackendForController(group, controller); \
|
||||
if (!backend) { \
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||
@ -460,5 +459,3 @@ virCgroupBackendForController(virCgroupPtr group,
|
||||
return ret; \
|
||||
} \
|
||||
return backend->func(group, ##__VA_ARGS__);
|
||||
|
||||
#endif /* LIBVIRT_VIRCGROUPBACKEND_H */
|
||||
|
@ -18,10 +18,7 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRCGROUPV1_H
|
||||
# define LIBVIRT_VIRCGROUPV1_H
|
||||
#pragma once
|
||||
|
||||
void
|
||||
virCgroupV1Register(void);
|
||||
|
||||
#endif /* LIBVIRT_VIRCGROUPV1_H */
|
||||
|
@ -18,10 +18,7 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRCGROUPV2_H
|
||||
# define LIBVIRT_VIRCGROUPV2_H
|
||||
#pragma once
|
||||
|
||||
void
|
||||
virCgroupV2Register(void);
|
||||
|
||||
#endif /* LIBVIRT_VIRCGROUPV2_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user