Skip to contentSkip to conversation

Make xc_console less chatty

PATCH New Anthony Liguori 1 participant 1 message Aug 4, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make xc_console less chatty

xc_console is probably too chatty about termios failures since ssh sessions apparently don't have proper term settings.

Regards,

Anthony Liguori

tools/consoled/xc_console.c +2 -10
diff -r 60c4cd9ebaa1 tools/consoled/xc_console.c
@@ -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
[email protected]
http://lists.xensource.com/xen-devel