return -1;
}
- if (setup_kmsg(&lxc_conf->rootfs, &lxc_conf->console)) // don't fail
- ERROR("failed to setup kmsg for '%s'", name);
+ if (lxc_conf->kmsg) {
+ if (setup_kmsg(&lxc_conf->rootfs, &lxc_conf->console)) // don't fail
+ ERROR("failed to setup kmsg for '%s'", name);
+ }
if (setup_tty(&lxc_conf->rootfs, &lxc_conf->tty_info, lxc_conf->ttydir)) {
ERROR("failed to setup the ttys for '%s'", name);
int maincmd_fd;
int autodev; // if 1, mount and fill a /dev at start
int stopsignal; // signal used to stop container
+ int kmsg; // if 1, create /dev/kmsg symlink
char *rcfile; // Copy of the top level rcfile we read
};
static int config_pts(const char *, const char *, struct lxc_conf *);
static int config_tty(const char *, const char *, struct lxc_conf *);
static int config_ttydir(const char *, const char *, struct lxc_conf *);
+static int config_kmsg(const char *, const char *, struct lxc_conf *);
#if HAVE_APPARMOR
static int config_aa_profile(const char *, const char *, struct lxc_conf *);
#endif
{ "lxc.pts", config_pts },
{ "lxc.tty", config_tty },
{ "lxc.devttydir", config_ttydir },
+ { "lxc.kmsg", config_kmsg },
#if HAVE_APPARMOR
{ "lxc.aa_profile", config_aa_profile },
#endif
return 0;
}
+static int config_kmsg(const char *key, const char *value,
+ struct lxc_conf *lxc_conf)
+{
+ int v = atoi(value);
+
+ lxc_conf->kmsg = v;
+
+ return 0;
+}
+
#if HAVE_APPARMOR
static int config_aa_profile(const char *key, const char *value,
struct lxc_conf *lxc_conf)