提交 9f344082 编写于 作者: J Jonathon Jongsma 提交者: Ján Tomko

util: cgroup: use #pragma once in headers

Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 65d6a1df
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册