diff options
Diffstat (limited to 'arch/um/os-Linux/tty_log.c')
-rw-r--r-- | arch/um/os-Linux/tty_log.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/um/os-Linux/tty_log.c b/arch/um/os-Linux/tty_log.c index ae9adb1b74f2..d11a55baa6bd 100644 --- a/arch/um/os-Linux/tty_log.c +++ b/arch/um/os-Linux/tty_log.c | |||
@@ -53,8 +53,8 @@ int open_tty_log(void *tty, void *current_tty) | |||
53 | .direction = 0, | 53 | .direction = 0, |
54 | .sec = tv.tv_sec, | 54 | .sec = tv.tv_sec, |
55 | .usec = tv.tv_usec } ); | 55 | .usec = tv.tv_usec } ); |
56 | os_write_file(tty_log_fd, &data, sizeof(data)); | 56 | write(tty_log_fd, &data, sizeof(data)); |
57 | os_write_file(tty_log_fd, ¤t_tty, data.len); | 57 | write(tty_log_fd, ¤t_tty, data.len); |
58 | return tty_log_fd; | 58 | return tty_log_fd; |
59 | } | 59 | } |
60 | 60 | ||
@@ -83,7 +83,7 @@ void close_tty_log(int fd, void *tty) | |||
83 | .direction = 0, | 83 | .direction = 0, |
84 | .sec = tv.tv_sec, | 84 | .sec = tv.tv_sec, |
85 | .usec = tv.tv_usec } ); | 85 | .usec = tv.tv_usec } ); |
86 | os_write_file(tty_log_fd, &data, sizeof(data)); | 86 | write(tty_log_fd, &data, sizeof(data)); |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | os_close_file(fd); | 89 | os_close_file(fd); |
@@ -98,10 +98,10 @@ static int log_chunk(int fd, const char *buf, int len) | |||
98 | try = (len > sizeof(chunk)) ? sizeof(chunk) : len; | 98 | try = (len > sizeof(chunk)) ? sizeof(chunk) : len; |
99 | missed = copy_from_user_proc(chunk, (char *) buf, try); | 99 | missed = copy_from_user_proc(chunk, (char *) buf, try); |
100 | try -= missed; | 100 | try -= missed; |
101 | n = os_write_file(fd, chunk, try); | 101 | n = write(fd, chunk, try); |
102 | if(n != try) { | 102 | if(n != try) { |
103 | if(n < 0) | 103 | if(n < 0) |
104 | return n; | 104 | return -errno; |
105 | return -EIO; | 105 | return -EIO; |
106 | } | 106 | } |
107 | if(missed != 0) | 107 | if(missed != 0) |
@@ -130,7 +130,7 @@ int write_tty_log(int fd, const char *buf, int len, void *tty, int is_read) | |||
130 | .direction = direction, | 130 | .direction = direction, |
131 | .sec = tv.tv_sec, | 131 | .sec = tv.tv_sec, |
132 | .usec = tv.tv_usec } ); | 132 | .usec = tv.tv_usec } ); |
133 | os_write_file(tty_log_fd, &data, sizeof(data)); | 133 | write(tty_log_fd, &data, sizeof(data)); |
134 | } | 134 | } |
135 | 135 | ||
136 | return log_chunk(fd, buf, len); | 136 | return log_chunk(fd, buf, len); |
@@ -161,7 +161,7 @@ void log_exec(char **argv, void *tty) | |||
161 | .direction = 0, | 161 | .direction = 0, |
162 | .sec = tv.tv_sec, | 162 | .sec = tv.tv_sec, |
163 | .usec = tv.tv_usec } ); | 163 | .usec = tv.tv_usec } ); |
164 | os_write_file(tty_log_fd, &data, sizeof(data)); | 164 | write(tty_log_fd, &data, sizeof(data)); |
165 | 165 | ||
166 | for(ptr = argv; ; ptr++){ | 166 | for(ptr = argv; ; ptr++){ |
167 | if(copy_from_user_proc(&arg, ptr, sizeof(arg))) | 167 | if(copy_from_user_proc(&arg, ptr, sizeof(arg))) |