aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/sigio.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:03 -0400
commitef0470c053274c343b2be8737e0146d65e17f9be (patch)
tree68809a8af1da35e3bb3530a667eea080e086fae0 /arch/um/os-Linux/sigio.c
parent3d564047a5f45cb628ec72514f68076e532988f3 (diff)
uml: tidy libc code
This patch lays some groundwork for the next one, which converts calls to os_{read,write}_file into {read,write}, by doing some tidying in the affected areas. do_not_aio gets restructured to make the final result a bit cleaner. There are also whitespace and other formatting fixes, fixes in error messages, and a typo fix. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/sigio.c')
-rw-r--r--arch/um/os-Linux/sigio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index f77ce3d6f7cc..8ccf6a36f1c6 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -461,15 +461,16 @@ static void tty_output(int master, int slave)
461 461
462 while(os_write_file(master, buf, sizeof(buf)) > 0) ; 462 while(os_write_file(master, buf, sizeof(buf)) > 0) ;
463 if(errno != EAGAIN) 463 if(errno != EAGAIN)
464 panic("check_sigio : write failed, errno = %d\n", errno); 464 panic("tty_output : write failed, errno = %d\n", errno);
465 while(((n = os_read_file(slave, buf, sizeof(buf))) > 0) && !got_sigio) ; 465 while(((n = os_read_file(slave, buf, sizeof(buf))) > 0) && !got_sigio) ;
466 466
467 if(got_sigio){ 467 if(got_sigio){
468 printk("Yes\n"); 468 printk("Yes\n");
469 pty_output_sigio = 1; 469 pty_output_sigio = 1;
470 } 470 }
471 else if(n == -EAGAIN) printk("No, enabling workaround\n"); 471 else if(n == -EAGAIN)
472 else panic("check_sigio : read failed, err = %d\n", n); 472 printk("No, enabling workaround\n");
473 else panic("tty_output : read failed, err = %d\n", n);
473} 474}
474 475
475static void tty_close(int master, int slave) 476static void tty_close(int master, int slave)