mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] uml: libc-dependent code should call libc directly
We shouldn't be using the os wrappers from os code - we can use libc directly. This patch replaces wrapper calls with libc calls. It turns out that os_sigio_async had only one caller, which was in startup.c, so that function is moved there and its name changed. Signed-off-by: Jeff Dike <jdike@addtoit.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:
parent
9eae9b132c
commit
73c8f4441f
3 changed files with 28 additions and 31 deletions
|
@ -162,25 +162,6 @@ int os_set_owner(int fd, int pid)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */
|
||||
int os_sigio_async(int master, int slave)
|
||||
{
|
||||
int flags;
|
||||
|
||||
flags = fcntl(master, F_GETFL);
|
||||
if(flags < 0)
|
||||
return -errno;
|
||||
|
||||
if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
|
||||
(fcntl(master, F_SETOWN, os_getpid()) < 0))
|
||||
return -errno;
|
||||
|
||||
if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
|
||||
return -errno;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int os_mode_fd(int fd, int mode)
|
||||
{
|
||||
int err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue