All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make xc_console less chatty
@ 2005-08-04 20:15 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2005-08-04 20:15 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

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@us.ibm.com>

Regards,

Anthony Liguori

[-- Attachment #2: xc_console_chatty.diff --]
[-- Type: text/x-patch, Size: 1151 bytes --]

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;
 			}
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-04 20:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04 20:15 [PATCH] Make xc_console less chatty Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.