aboutsummaryrefslogtreecommitdiffstats
path: root/tools/console/client
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-09-20 16:02:22 +0100
committerKeir Fraser <keir@xensource.com>2007-09-20 16:02:22 +0100
commitc11a94127d3fed24c60bccc0f799cb4e50583ade (patch)
treeddc70502063a57d3160f9df5466b83331bff9b81 /tools/console/client
parentb35124143b08de32a5fb5a8a988b0f4e4711a092 (diff)
downloadxen-c11a94127d3fed24c60bccc0f799cb4e50583ade.tar.gz
xen-c11a94127d3fed24c60bccc0f799cb4e50583ade.tar.bz2
xen-c11a94127d3fed24c60bccc0f799cb4e50583ade.zip
Fix tools/console to build on NetBSD.
- include headers needed to build on NetBSD - Remove unused pty.h - Initialize spty terminal before actually using it Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/console/client')
-rw-r--r--tools/console/client/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index b7a45212a0..509e44bf91 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -34,7 +34,7 @@
#include <sys/select.h>
#include <err.h>
#include <errno.h>
-#include <pty.h>
+#include <string.h>
#include "xs.h"
@@ -113,9 +113,8 @@ static void init_term(int fd, struct termios *old)
{
struct termios new_term;
- if (tcgetattr(fd, old) == -1) {
+ if (tcgetattr(fd, old) == -1)
return;
- }
new_term = *old;
cfmakeraw(&new_term);
@@ -289,6 +288,7 @@ int main(int argc, char **argv)
err(errno, "Could not read tty from store");
}
+ init_term(spty, &attr);
init_term(STDIN_FILENO, &attr);
console_loop(spty, xs, path);
restore_term(STDIN_FILENO, &attr);