Skip to content

Commit 9e9b297

Browse files
committed
src/bindings: add features list
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
1 parent 9fa2796 commit 9e9b297

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
@@ -99,16 +99,30 @@ extern int rwlock_rdlock_interruptible(pthread_rwlock_t *l);
9999
extern int rwlock_wrlock_interruptible(pthread_rwlock_t *l);
100100

101101
struct file_info {
102-
char *controller;
103-
char *cgroup;
104-
char *file;
102+
union {
103+
struct {
104+
char *controller;
105+
char *cgroup;
106+
char *file;
107+
};
108+
struct {
109+
void *private_data;
110+
};
111+
};
112+
105113
int type;
106114
char *buf; /* unused */
107115
int buflen;
108-
int size; /*actual data size */
116+
int size; /* actual data size */
109117
int cached;
110118
};
111119

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

0 commit comments

Comments
 (0)