diff mbox

[2/2] kvm tools: Mount devpts to /dev/pts

Message ID 1345807781-23452-2-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He Aug. 24, 2012, 11:29 a.m. UTC
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>
---
 tools/kvm/guest/init.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/tools/kvm/guest/init.c b/tools/kvm/guest/init.c
index 44e7db8..e1f377f 100644
--- a/tools/kvm/guest/init.c
+++ b/tools/kvm/guest/init.c
@@ -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[])