From: Cedric Le Goater Date: Thu, 27 May 2010 14:16:30 +0000 (+0200) Subject: use ptmxmode mount option X-Git-Tag: lxc-0.7.0~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ac29abe457c723373031cdfc36720a07f20afb7;p=thirdparty%2Flxc.git use ptmxmode mount option Save one call by using the ptmxmode mount option. Signed-off-by: Cedric Le Goater Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index e7c93c0ed..f4ed89609 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -623,16 +623,11 @@ static int setup_pts(int pts) return -1; } - if (mount("devpts", "/dev/pts", "devpts", MS_MGC_VAL, "newinstance")) { + if (mount("devpts", "/dev/pts", "devpts", MS_MGC_VAL, "newinstance,ptmxmode=0666")) { SYSERROR("failed to mount a new instance of '/dev/pts'"); return -1; } - if (chmod("/dev/pts/ptmx", 0666)) { - SYSERROR("failed to set permission for '/dev/pts/ptmx'"); - return -1; - } - if (access("/dev/ptmx", F_OK)) { if (!symlink("/dev/pts/ptmx", "/dev/ptmx")) goto out;