Commit 2ac29abe by Cedric Le Goater Committed by Daniel Lezcano

use ptmxmode mount option

Save one call by using the ptmxmode mount option. Signed-off-by: 's avatarCedric Le Goater <clg@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent d674be08
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment