ia64/xen-unstable

changeset 15952:40bf3ffff484

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>
author Keir Fraser <keir@xensource.com>
date Thu Sep 20 16:02:22 2007 +0100 (2007-09-20)
parents ecbddf7b7896
children 517432b9f8b5
files tools/console/client/main.c tools/console/daemon/utils.c
line diff
     1.1 --- a/tools/console/client/main.c	Thu Sep 20 15:59:51 2007 +0100
     1.2 +++ b/tools/console/client/main.c	Thu Sep 20 16:02:22 2007 +0100
     1.3 @@ -34,7 +34,7 @@
     1.4  #include <sys/select.h>
     1.5  #include <err.h>
     1.6  #include <errno.h>
     1.7 -#include <pty.h>
     1.8 +#include <string.h>
     1.9  
    1.10  #include "xs.h"
    1.11  
    1.12 @@ -113,9 +113,8 @@ static void init_term(int fd, struct ter
    1.13  {
    1.14  	struct termios new_term;
    1.15  
    1.16 -	if (tcgetattr(fd, old) == -1) {
    1.17 +	if (tcgetattr(fd, old) == -1)
    1.18  		return;
    1.19 -	}
    1.20  
    1.21  	new_term = *old;
    1.22  	cfmakeraw(&new_term);
    1.23 @@ -289,6 +288,7 @@ int main(int argc, char **argv)
    1.24  		err(errno, "Could not read tty from store");
    1.25  	}
    1.26  
    1.27 +	init_term(spty, &attr);
    1.28  	init_term(STDIN_FILENO, &attr);
    1.29  	console_loop(spty, xs, path);
    1.30  	restore_term(STDIN_FILENO, &attr);
     2.1 --- a/tools/console/daemon/utils.c	Thu Sep 20 15:59:51 2007 +0100
     2.2 +++ b/tools/console/daemon/utils.c	Thu Sep 20 16:02:22 2007 +0100
     2.3 @@ -32,6 +32,7 @@
     2.4  #include <sys/socket.h>
     2.5  #include <sys/un.h>
     2.6  #include <string.h>
     2.7 +#include <signal.h>
     2.8  
     2.9  #include "xenctrl.h"
    2.10  #include "utils.h"