From: Christian Brauner Date: Wed, 31 May 2017 12:55:37 +0000 (+0200) Subject: confile: add clearer for lxc.pts X-Git-Tag: lxc-2.1.0~110^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03818ae3d04ec5ad97c4691d14c4d22086ce303e;p=thirdparty%2Flxc.git confile: add clearer for lxc.pts Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index e68de988e..267a9506c 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -69,6 +69,7 @@ static int clr_config_personality(const char *, struct lxc_conf *); 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 *); @@ -215,7 +216,7 @@ static int get_config_limit(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 }, @@ -2859,9 +2860,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key) } 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); @@ -4084,3 +4082,9 @@ static inline int clr_config_personality(const char *key, struct lxc_conf *c) c->personality = -1; return 0; } + +static inline int clr_config_pts(const char *key, struct lxc_conf *c) +{ + c->pts = 0; + return 0; +}