diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-11 10:08:31 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-11 10:08:31 +0000 |
commit | 5a039efe118ed8aa338bf02b5d88c1dcae9534b3 (patch) | |
tree | 0acf24fff42a417c3da76ea8d689be947a1e2a70 /tools/console | |
parent | 408cf363fa1cdb6cdd3e0513b86f8e81022c3e07 (diff) | |
download | xen-5a039efe118ed8aa338bf02b5d88c1dcae9534b3.tar.gz xen-5a039efe118ed8aa338bf02b5d88c1dcae9534b3.tar.bz2 xen-5a039efe118ed8aa338bf02b5d88c1dcae9534b3.zip |
xenconsole: Compile fixes for console code on Solaris
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/client/main.c | 15 | ||||
-rw-r--r-- | tools/console/daemon/main.c | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tools/console/client/main.c b/tools/console/client/main.c index 509e44bf91..6fb41114b6 100644 --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -71,6 +71,21 @@ static void usage(const char *program) { , program); } +#ifdef __sun__ +void cfmakeraw (struct termios *termios_p) +{ + termios_p->c_iflag &= + ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + termios_p->c_oflag &= ~OPOST; + termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + termios_p->c_cflag &= ~(CSIZE|PARENB); + termios_p->c_cflag |= CS8; + + termios_p->c_cc[VMIN] = 0; + termios_p->c_cc[VTIME] = 0; +} +#endif + static int get_pty_fd(struct xs_handle *xs, char *path, int seconds) /* Check for a pty in xenstore, open it and return its fd. * Assumes there is already a watch set in the store for this path. */ diff --git a/tools/console/daemon/main.c b/tools/console/daemon/main.c index c1529d0ac2..60faa4bb2a 100644 --- a/tools/console/daemon/main.c +++ b/tools/console/daemon/main.c @@ -86,7 +86,9 @@ int main(int argc, char **argv) version(argv[0]); exit(0); case 'v': +#ifndef __sun__ syslog_option |= LOG_PERROR; +#endif syslog_mask = LOG_DEBUG; break; case 'i': |