static int set_config_pts(const char *, const char *, struct lxc_conf *);
static int get_config_pts(const char *, char *, int, struct lxc_conf *);
+static int clr_config_pts(const char *, struct lxc_conf *);
static int set_config_tty(const char *, const char *, struct lxc_conf *);
static int get_config_tty(const char *, char *, int, struct lxc_conf *);
static struct lxc_config_t config[] = {
{ "lxc.arch", set_config_personality, get_config_personality, clr_config_personality, },
- { "lxc.pts", set_config_pts, get_config_pts, NULL },
+ { "lxc.pts", set_config_pts, get_config_pts, clr_config_pts, },
{ "lxc.tty", set_config_tty, get_config_tty, NULL },
{ "lxc.devttydir", set_config_ttydir, get_config_ttydir, NULL },
{ "lxc.kmsg", set_config_kmsg, get_config_kmsg, NULL },
} else if (strcmp(key, "lxc.monitor.unshare") == 0) {
c->monitor_unshare = 0;
- } else if (strcmp(key, "lxc.pts") == 0) {
- c->pts = 0;
-
} else if (strcmp(key, "lxc.include") == 0) {
lxc_clear_includes(c);
c->personality = -1;
return 0;
}
+
+static inline int clr_config_pts(const char *key, struct lxc_conf *c)
+{
+ c->pts = 0;
+ return 0;
+}