Skip to content

Commit

Permalink
conf: remove /dev/console from lxc_fill_autodev()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed May 10, 2017
1 parent a489983 commit b55e06b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lxc/conf.c
Expand Up @@ -1110,7 +1110,6 @@ static const struct lxc_devs lxc_devs[] = {
{ "urandom", S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO, 1, 9 },
{ "random", S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO, 1, 8 },
{ "tty", S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO, 5, 0 },
{ "console", S_IFCHR | S_IRUSR | S_IWUSR, 5, 1 },
};

static int lxc_fill_autodev(const struct lxc_rootfs *rootfs, bool mount_console)
Expand All @@ -1135,9 +1134,6 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs, bool mount_console)
for (i = 0; i < sizeof(lxc_devs) / sizeof(lxc_devs[0]); i++) {
const struct lxc_devs *d = &lxc_devs[i];

if (!strcmp(d->name, "console") && !mount_console)
continue;

ret = snprintf(path, MAXPATHLEN, "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
if (ret < 0 || ret >= MAXPATHLEN)
return -1;
Expand Down

0 comments on commit b55e06b

Please sign in to comment.