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] Make xc_console less chatty

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Make xc_console less chatty
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Thu, 04 Aug 2005 15:15:12 -0500
Delivery-date: Thu, 04 Aug 2005 20:13:57 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
xc_console is probably too chatty about termios failures since ssh sessions apparently don't have proper term settings.

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

Regards,

Anthony Liguori
diff -r 60c4cd9ebaa1 tools/consoled/xc_console.c
--- a/tools/consoled/xc_console.c       Wed Aug  3 16:11:32 2005
+++ b/tools/consoled/xc_console.c       Thu Aug  4 15:12:57 2005
@@ -78,23 +78,18 @@
        struct termios new_term;
 
        if (tcgetattr(fd, old) == -1) {
-               perror("tcgetattr() failed");
                return;
        }
 
        new_term = *old;
        cfmakeraw(&new_term);
 
-       if (tcsetattr(fd, TCSAFLUSH, &new_term) == -1) {
-               perror("tcsetattr() failed");
-       }
+       tcsetattr(fd, TCSAFLUSH, &new_term);
 }
 
 static void restore_term(int fd, struct termios *old)
 {
-       if (tcsetattr(fd, TCSAFLUSH, old) == -1) {
-               perror("tcsetattr() failed");
-       }
+       tcsetattr(fd, TCSAFLUSH, old);
 }
 
 static int console_loop(int xc_handle, domid_t domid, int fd)
@@ -113,7 +108,6 @@
                        if (errno == EINTR || errno == EAGAIN) {
                                continue;
                        }
-                       perror("select() failed");
                        return -1;
                }
 
@@ -131,7 +125,6 @@
                                    (errno == EINTR || errno == EAGAIN)) {
                                        continue;
                                }
-                               perror("select() failed");
                                return -1;
                        }
 
@@ -151,7 +144,6 @@
                                    (errno == EINTR || errno == EAGAIN)) {
                                        continue;
                                }
-                               perror("select() failed");
                                return -1;
                        }
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Make xc_console less chatty, Anthony Liguori <=