提交 cd772425 编写于 作者: P Pavel Hrdina

vircgroup: Introduce standard set of typedefs and use them

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 70dc671a
......@@ -385,7 +385,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
const char *typestr = virCgroupControllerTypeToString(i);
int typelen = strlen(typestr);
char *tmp = entry.mnt_opts;
struct _virCgroupController *controller = &group->controllers[i];
virCgroupControllerPtr controller = &group->controllers[i];
while (tmp) {
char *next = strchr(tmp, ',');
int len;
......
......@@ -29,7 +29,8 @@
# include "virbitmap.h"
struct _virCgroup;
typedef struct _virCgroup *virCgroupPtr;
typedef struct _virCgroup virCgroup;
typedef virCgroup *virCgroupPtr;
enum {
VIR_CGROUP_CONTROLLER_CPU,
......
......@@ -41,11 +41,13 @@ struct _virCgroupController {
char *linkPoint;
char *placement;
};
typedef struct _virCgroupController virCgroupController;
typedef virCgroupController *virCgroupControllerPtr;
struct _virCgroup {
char *path;
struct _virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
};
int virCgroupDetectMountsFromFile(virCgroupPtr group,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册