]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Create ptmx as a device
authorSerge Hallyn <serge.hallyn@canonical.com>
Wed, 31 Aug 2011 18:18:33 +0000 (13:18 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 2 Sep 2011 02:11:50 +0000 (20:11 -0600)
commitc1665ba872dca310430f218263b1e4675b79838a
treeb2b615f13016d54ce62fdfaefe80db24a955eb32
parentd4b9e06256d4a64c1e9d6282a208d440dd019c99
Create ptmx as a device

Hi,

I'm seeing an issue with udev and libvirt-lxc.  Libvirt-lxc creates
/dev/ptmx as a symlink to /dev/pts/ptmx.  When udev starts up, it
checks the device type, sees ptmx is 'not right', and replaces it
with a 'proper' ptmx.

In lxc, /dev/ptmx is bind-mounted from /dev/pts/ptmx instead of being
symlinked, so udev sees the right device type and leaves it alone.

A patch like the following seems to work for me.  Would there be
any objections to this?

>From 4c5035de52de7e06a0de9c5d0bab8c87a806cba7 Mon Sep 17 00:00:00 2001
From: Ubuntu <ubuntu@domU-12-31-39-14-F0-B3.compute-1.internal>
Date: Wed, 31 Aug 2011 18:15:54 +0000
Subject: [PATCH 1/1] make ptmx a bind mount rather than symlink

udev on some systems checks the device type of /dev/ptmx, and replaces it if
not as expected.  The symlink created by libvirt-lxc therefore gets replaced.
By creating it as a bind mount, the device type is correct and udev leaves it
alone.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
src/lxc/lxc_container.c