]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Mount devpts to /dev/pts
authorAsias He <asias.hejun@gmail.com>
Fri, 24 Aug 2012 11:29:41 +0000 (19:29 +0800)
committerPekka Enberg <penberg@kernel.org>
Fri, 24 Aug 2012 13:15:50 +0000 (16:15 +0300)
I'm seeing this in guest due to lacking of /dev/pts:

   sh-4.2# xterm
   xterm: Error 32, errno 28: No space left on device
   Reason: get_pty: not enough ptys

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/guest/init.c

index 44e7db811c47139dc87a18a6b46f5e6048be45e0..e1f377f714a6ff9c2b806c370ffde606faf7dafe 100644 (file)
@@ -31,6 +31,8 @@ static void do_mounts(void)
        mount("", "/sys", "sysfs", 0, NULL);
        mount("proc", "/proc", "proc", 0, NULL);
        mount("devtmpfs", "/dev", "devtmpfs", 0, NULL);
+       mkdir("/dev/pts", 0755);
+       mount("devpts", "/dev/pts", "devpts", 0, NULL);
 }
 
 int main(int argc, char *argv[])