ia64/xen-unstable

changeset 19310:07042b677ba4

xenconsole: Compile fixes for console code on Solaris

Signed-off-by: John Levon <john.levon@sun.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 11 10:08:31 2009 +0000 (2009-03-11)
parents 1282561a2bf2
children e6b7b747d122
files tools/console/client/main.c tools/console/daemon/main.c
line diff
     1.1 --- a/tools/console/client/main.c	Wed Mar 11 10:07:06 2009 +0000
     1.2 +++ b/tools/console/client/main.c	Wed Mar 11 10:08:31 2009 +0000
     1.3 @@ -71,6 +71,21 @@ static void usage(const char *program) {
     1.4  	       , program);
     1.5  }
     1.6  
     1.7 +#ifdef	__sun__
     1.8 +void cfmakeraw (struct termios *termios_p)
     1.9 +{
    1.10 +	termios_p->c_iflag &=
    1.11 +	    ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
    1.12 +	termios_p->c_oflag &= ~OPOST;
    1.13 +	termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
    1.14 +	termios_p->c_cflag &= ~(CSIZE|PARENB);
    1.15 +	termios_p->c_cflag |= CS8;
    1.16 +
    1.17 +	termios_p->c_cc[VMIN] = 0;
    1.18 +	termios_p->c_cc[VTIME] = 0;
    1.19 +}
    1.20 +#endif
    1.21 +
    1.22  static int get_pty_fd(struct xs_handle *xs, char *path, int seconds)
    1.23  /* Check for a pty in xenstore, open it and return its fd.
    1.24   * Assumes there is already a watch set in the store for this path. */
     2.1 --- a/tools/console/daemon/main.c	Wed Mar 11 10:07:06 2009 +0000
     2.2 +++ b/tools/console/daemon/main.c	Wed Mar 11 10:08:31 2009 +0000
     2.3 @@ -86,7 +86,9 @@ int main(int argc, char **argv)
     2.4  			version(argv[0]);
     2.5  			exit(0);
     2.6  		case 'v':
     2.7 +#ifndef __sun__
     2.8  			syslog_option |= LOG_PERROR;
     2.9 +#endif
    2.10  			syslog_mask = LOG_DEBUG;
    2.11  			break;
    2.12  		case 'i':