Skip to content

Commit b06c571

Browse files
committed
src/bindings: add features list
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
1 parent 6ee0659 commit b06c571

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/bindings.c

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
#define BASEDIR "/lxcfs/controllers"
4646
#define ROOTDIR "/lxcfs/root"
4747

48+
feature_t per_instance_features[63] = {
49+
{ }
50+
};
51+
4852
static bool can_use_pidfd;
4953
static bool can_use_swap;
5054
static bool can_use_sys_cpu;

src/bindings.h

+18-4
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,30 @@ extern int rwlock_rdlock_interruptible(pthread_rwlock_t *l);
100100
extern int rwlock_wrlock_interruptible(pthread_rwlock_t *l);
101101

102102
struct file_info {
103-
char *controller;
104-
char *cgroup;
105-
char *file;
103+
union {
104+
struct {
105+
char *controller;
106+
char *cgroup;
107+
char *file;
108+
};
109+
struct {
110+
void *private_data;
111+
};
112+
};
113+
106114
int type;
107115
char *buf; /* unused */
108116
int buflen;
109-
int size; /*actual data size */
117+
int size; /* actual data size */
110118
int cached;
111119
};
112120

121+
typedef struct feature {
122+
char *name;
123+
} feature_t;
124+
125+
extern feature_t per_instance_features[];
126+
113127
enum lxcfs_feature_op {
114128
LXCFS_FEATURE_CHECK,
115129
LXCFS_FEATURE_SET,

0 commit comments

Comments
 (0)