Properly convert FreeBSD priority values into Linux values in the
getpriority(2) syscall. PR: kern/81951 Submitted by: Andriy Gapon <avg@icyb.net.ua>
This commit is contained in:
parent
b53b83993c
commit
307c6bb149
@ -181,7 +181,7 @@
|
||||
struct l_sockaddr *name, l_int namelen); }
|
||||
99 AUE_NULL NOPROTO { int oaccept(int s, caddr_t name, \
|
||||
int *anamelen); } accept accept_args int
|
||||
100 AUE_NULL UNIMPL osf_getpriority
|
||||
100 AUE_NULL MSTD { int linux_getpriority(int which, int who); }
|
||||
101 AUE_NULL NOPROTO { int osend(int s, caddr_t buf, int len, \
|
||||
int flags); }
|
||||
102 AUE_NULL NOPROTO { int orecv(int s, caddr_t buf, int len, \
|
||||
|
@ -176,7 +176,7 @@
|
||||
93 AUE_NULL NOPROTO { int oftruncate(int fd, long length); }
|
||||
94 AUE_NULL NOPROTO { int fchmod(int fd, int mode); }
|
||||
95 AUE_NULL NOPROTO { int fchown(int fd, int uid, int gid); }
|
||||
96 AUE_NULL MNOPROTO { int getpriority(int which, int who); }
|
||||
96 AUE_NULL MSTD { int linux_getpriority(int which, int who); }
|
||||
97 AUE_NULL MNOPROTO { int setpriority(int which, int who, \
|
||||
int prio); }
|
||||
98 AUE_NULL UNIMPL profil
|
||||
|
@ -1401,3 +1401,16 @@ linux_nosys(struct thread *td, struct nosys_args *ignore)
|
||||
|
||||
return (ENOSYS);
|
||||
}
|
||||
|
||||
int
|
||||
linux_getpriority(struct thread *td, struct linux_getpriority_args *args)
|
||||
{
|
||||
struct getpriority_args bsd_args;
|
||||
int error;
|
||||
|
||||
bsd_args.which = args->which;
|
||||
bsd_args.who = args->who;
|
||||
error = getpriority(td, &bsd_args);
|
||||
td->td_retval[0] = 20 - td->td_retval[0];
|
||||
return error;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@
|
||||
93 AUE_NULL NOPROTO { int oftruncate(int fd, long length); }
|
||||
94 AUE_NULL NOPROTO { int fchmod(int fd, int mode); }
|
||||
95 AUE_NULL NOPROTO { int fchown(int fd, int uid, int gid); }
|
||||
96 AUE_NULL MNOPROTO { int getpriority(int which, int who); }
|
||||
96 AUE_NULL MSTD { int linux_getpriority(int which, int who); }
|
||||
97 AUE_NULL MNOPROTO { int setpriority(int which, int who, \
|
||||
int prio); }
|
||||
98 AUE_NULL UNIMPL profil
|
||||
|
Loading…
Reference in New Issue
Block a user