uml: console subsystem tidying
This does a lot of cleanup on the UML console system. This patch should be entirely non-functional. The tidying is as follows: header cleanups - the includes should be closer to minimal and complete all printks now have a severity lots of style fixes fd_close is restructured a little in order to reduce the nesting some functions were calling the os_* wrappers when they can call libc directly port_accept had a unnecessary variable it also tested a pid unecessarily before killing it some functions were made static xterm_free is gone, as it was identical to generic_free 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>
This commit is contained in:
committed by
Linus Torvalds
parent
79f662334f
commit
e99525f970
@ -56,11 +56,11 @@ static int pts_open(int input, int output, int primary, void *d,
|
||||
if (data->raw) {
|
||||
CATCH_EINTR(err = tcgetattr(fd, &data->tt));
|
||||
if (err)
|
||||
return err;
|
||||
goto out_close;
|
||||
|
||||
err = raw(fd);
|
||||
if (err)
|
||||
return err;
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
dev = ptsname(fd);
|
||||
@ -71,6 +71,10 @@ static int pts_open(int input, int output, int primary, void *d,
|
||||
(*data->announce)(dev, data->dev);
|
||||
|
||||
return fd;
|
||||
|
||||
out_close:
|
||||
close(fd);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int getmaster(char *line)
|
||||
@ -119,10 +123,12 @@ static int pty_open(int input, int output, int primary, void *d,
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
if(data->raw){
|
||||
if (data->raw) {
|
||||
err = raw(fd);
|
||||
if (err)
|
||||
if (err) {
|
||||
close(fd);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
if (data->announce)
|
||||
|
Reference in New Issue
Block a user