Skip to contentSkip to conversation

n_tty.c buglet breaks error returns

PATCH New Jeff Dike 1 participant 1 message Sep 21, 2002 Char and misc drivers

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/1 n_tty.c buglet breaks error returns

The tty SIGIO fix that went into 2.4.19 breaks error returns from the underlying driver. Currently, any errors from the driver causes write_chan to call schedule() rather than returning the error.

This broke the UML test suite, the fix below makes it work again.

Jeff

drivers/char/n_tty.c +1 -1
@@ -1180,7 +1180,7 @@
 			while (nr > 0) {
 				ssize_t num = opost_block(tty, b, nr);
 				if (num < 0){
-				        if(num != -EAGAIN)
+				        if(num == -EAGAIN)
 					        break;
 					retval = num;
 					goto break_out;