WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Compile fixes for console code on Solaris

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Compile fixes for console code on Solaris
From: John Levon <john.levon@xxxxxxx>
Date: Mon, 09 Mar 2009 18:30:20 -0700
Delivery-date: Mon, 09 Mar 2009 18:28:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User John Levon <john.levon@xxxxxxx>
# Date 1236648522 25200
# Node ID 98918b6d1efadce8a6fc1853d3f8394e9d30f2b2
# Parent  d035b66b5b4db5afd42b1ac0bb4ec6bce0c4ece3
Compile fixes for console code on Solaris

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
--- 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
--- 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':

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Compile fixes for console code on Solaris, John Levon <=