mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
vircgroup: Introduce standard set of typedefs and use them
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
70dc671a27
commit
cd77242504
@ -385,7 +385,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
|
|||||||
const char *typestr = virCgroupControllerTypeToString(i);
|
const char *typestr = virCgroupControllerTypeToString(i);
|
||||||
int typelen = strlen(typestr);
|
int typelen = strlen(typestr);
|
||||||
char *tmp = entry.mnt_opts;
|
char *tmp = entry.mnt_opts;
|
||||||
struct _virCgroupController *controller = &group->controllers[i];
|
virCgroupControllerPtr controller = &group->controllers[i];
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
char *next = strchr(tmp, ',');
|
char *next = strchr(tmp, ',');
|
||||||
int len;
|
int len;
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
# include "virbitmap.h"
|
# include "virbitmap.h"
|
||||||
|
|
||||||
struct _virCgroup;
|
struct _virCgroup;
|
||||||
typedef struct _virCgroup *virCgroupPtr;
|
typedef struct _virCgroup virCgroup;
|
||||||
|
typedef virCgroup *virCgroupPtr;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
VIR_CGROUP_CONTROLLER_CPU,
|
VIR_CGROUP_CONTROLLER_CPU,
|
||||||
|
@ -41,11 +41,13 @@ struct _virCgroupController {
|
|||||||
char *linkPoint;
|
char *linkPoint;
|
||||||
char *placement;
|
char *placement;
|
||||||
};
|
};
|
||||||
|
typedef struct _virCgroupController virCgroupController;
|
||||||
|
typedef virCgroupController *virCgroupControllerPtr;
|
||||||
|
|
||||||
struct _virCgroup {
|
struct _virCgroup {
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
struct _virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
|
virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
|
||||||
};
|
};
|
||||||
|
|
||||||
int virCgroupDetectMountsFromFile(virCgroupPtr group,
|
int virCgroupDetectMountsFromFile(virCgroupPtr group,
|
||||||
|
Loading…
Reference in New Issue
Block a user