]> git.ipfire.org Git - thirdparty/lxc.git/commit
autodev: don't always create /dev/console 900/head
authorTycho Andersen <tycho.andersen@canonical.com>
Thu, 17 Mar 2016 11:14:43 +0000 (05:14 -0600)
committerTycho Andersen <tycho.andersen@canonical.com>
Thu, 17 Mar 2016 19:39:15 +0000 (13:39 -0600)
commit0728ebf499ef31214370563bcc685cadcebbaa11
tree50dca850556172656321e0ba1c9c8931f70fb20e
parentb3e4df8a83aba1256ab359128abcab7edc7dd9c3
autodev: don't always create /dev/console

In particular, only create /dev/console when it is set to "none".
Otherwise, we will bind mount a pts device later, so let's just leave it.

Also, when bind mounting the pts device, let's create /dev/console if it
doesn't exist, since it may not already exist due to the above :)

v2: s/ot/to
v3: add O_EXCL so we actually get EEXIST, use the right condition for
    mount_console (we want to compare against console.path, not
    console.name, and console.path can be null)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
src/lxc/conf.c