All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Clay <mattclay@hevanet.com>
To: Matt Clay <mattclay@hevanet.com>
Cc: Jeff Dike <jdike@addtoit.com>,
	Allen Chan <alydar@users.sourceforge.net>,
	user-mode-linux-devel@lists.sourceforge.net,
	260111@bugs.debian.org
Subject: Re: [uml-devel] Re: Bug#260111: user-mode-linux: upgrade hangs at "NET4: Linux TCP/IP 1.0 for NET4.0 "
Date: Sat, 31 Jul 2004 20:46:57 -0700	[thread overview]
Message-ID: <410C67B1.4070402@hevanet.com> (raw)
In-Reply-To: <410C6367.3090206@hevanet.com>

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

Matt Clay wrote:
> 
> This patch seems to fix the problem by adding error handling to
> the tcsetattr call in generic_console_write.

Looks like pasting the patch inline wasn't a good idea.  I've attached the 
patch this time.

  - Matt

[-- Attachment #2: tcsetattr_check --]
[-- Type: text/plain, Size: 616 bytes --]

--- um.orig/arch/um/drivers/chan_kern.c	2004-07-26 11:43:52.000000000 -0700
+++ um/arch/um/drivers/chan_kern.c	2004-07-31 19:38:51.000000000 -0700
@@ -117,15 +117,15 @@
 {
 	struct termios save, new;
 	int err;
+	int changed = 0;
 
-	if(isatty(fd)){
-		tcgetattr(fd, &save);
+	if(isatty(fd) && tcgetattr(fd, &save) == 0) {
 		new = save;
 		new.c_oflag |= OPOST;
-		tcsetattr(fd, TCSAFLUSH, &new);
+		if(tcsetattr(fd, TCSAFLUSH, &new) == 0) changed = 1;
 	}
 	err = generic_write(fd, buf, n, NULL);
-	if(isatty(fd)) tcsetattr(fd, TCSAFLUSH, &save);
+	if(changed) tcsetattr(fd, TCSAFLUSH, &save);
 	return(err);
 }
 

  reply	other threads:[~2004-08-01  3:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  7:15 [uml-devel] Re: Bug#260111: user-mode-linux: upgrade hangs at "NET4: Linux TCP/IP 1.0 for NET4.0 " Allen Chan
2004-07-28 17:22 ` Jeff Dike
2004-07-29 18:30   ` Allen Chan
2004-07-30  2:34     ` Allen Chan
2004-07-30 17:23       ` Jeff Dike
2004-07-30 17:19         ` Matt Clay
2004-07-30 17:43           ` Allen Chan
2004-07-30 18:49           ` Jeff Dike
2004-07-30 21:44             ` Allen Chan
2004-07-31  5:08               ` Jeff Dike
2004-07-31  7:59             ` Matt Clay
2004-08-01  3:28             ` Matt Clay
2004-08-01  3:46               ` Matt Clay [this message]
2004-08-01 15:52               ` Jeff Dike
2004-08-01 20:10                 ` Matt Clay
2004-08-02  5:15                   ` Allen Chan
2004-08-02  7:33                     ` Matt Clay
2004-08-02  8:14                     ` Matt Clay
2004-08-02 19:19                     ` Jeff Dike
2004-08-03  6:06                 ` Matt Clay
2004-07-30 23:51         ` Daniel Heemann
2004-07-31  0:30         ` Nicholas Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410C67B1.4070402@hevanet.com \
    --to=mattclay@hevanet.com \
    --cc=260111@bugs.debian.org \
    --cc=alydar@users.sourceforge.net \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.