Skip to content

Commit 454e426

Browse files
committed
src/bindings: add features list
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
1 parent 4f8674b commit 454e426

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/bindings.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include "syscall_numbers.h"
4141
#include "utils.h"
4242

43+
feature_t per_instance_features[63] = {
44+
{ }
45+
};
46+
4347
static bool can_use_pidfd;
4448
static bool can_use_swap;
4549
static bool can_use_sys_cpu;

src/bindings.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,30 @@ extern int rwlock_rdlock_interruptible(pthread_rwlock_t *l);
103103
extern int rwlock_wrlock_interruptible(pthread_rwlock_t *l);
104104

105105
struct file_info {
106-
char *controller;
107-
char *cgroup;
108-
char *file;
106+
union {
107+
struct {
108+
char *controller;
109+
char *cgroup;
110+
char *file;
111+
};
112+
struct {
113+
void *private_data;
114+
};
115+
};
116+
109117
int type;
110118
char *buf; /* unused */
111119
int buflen;
112-
int size; /*actual data size */
120+
int size; /* actual data size */
113121
int cached;
114122
};
115123

124+
typedef struct feature {
125+
char *name;
126+
} feature_t;
127+
128+
extern feature_t per_instance_features[];
129+
116130
enum lxcfs_feature_op {
117131
LXCFS_FEATURE_CHECK,
118132
LXCFS_FEATURE_SET,

0 commit comments

Comments
 (0)