diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 14:51:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 12:13:03 -0700 |
commit | ef0470c053274c343b2be8737e0146d65e17f9be (patch) | |
tree | 68809a8af1da35e3bb3530a667eea080e086fae0 /arch/um/os-Linux/tty_log.c | |
parent | 3d564047a5f45cb628ec72514f68076e532988f3 (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/tty_log.c')
-rw-r--r-- | arch/um/os-Linux/tty_log.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/um/os-Linux/tty_log.c b/arch/um/os-Linux/tty_log.c index c6ba56c1560f..ae9adb1b74f2 100644 --- a/arch/um/os-Linux/tty_log.c +++ b/arch/um/os-Linux/tty_log.c @@ -55,7 +55,7 @@ int open_tty_log(void *tty, void *current_tty) .usec = tv.tv_usec } ); os_write_file(tty_log_fd, &data, sizeof(data)); os_write_file(tty_log_fd, ¤t_tty, data.len); - return(tty_log_fd); + return tty_log_fd; } sprintf(buf, "%s/%0u-%0u", tty_log_dir, (unsigned int) tv.tv_sec, @@ -67,7 +67,7 @@ int open_tty_log(void *tty, void *current_tty) printk("open_tty_log : couldn't open '%s', errno = %d\n", buf, -fd); } - return(fd); + return fd; } void close_tty_log(int fd, void *tty) @@ -101,18 +101,18 @@ static int log_chunk(int fd, const char *buf, int len) n = os_write_file(fd, chunk, try); if(n != try) { if(n < 0) - return(n); - return(-EIO); + return n; + return -EIO; } if(missed != 0) - return(-EFAULT); + return -EFAULT; len -= try; total += try; buf += try; } - return(total); + return total; } int write_tty_log(int fd, const char *buf, int len, void *tty, int is_read) @@ -133,7 +133,7 @@ int write_tty_log(int fd, const char *buf, int len, void *tty, int is_read) os_write_file(tty_log_fd, &data, sizeof(data)); } - return(log_chunk(fd, buf, len)); + return log_chunk(fd, buf, len); } void log_exec(char **argv, void *tty) @@ -179,7 +179,7 @@ extern void register_tty_logger(int (*opener)(void *, void *), static int register_logger(void) { register_tty_logger(open_tty_log, write_tty_log, close_tty_log); - return(0); + return 0; } __uml_initcall(register_logger); |