diff options
author | 2012-09-05 17:13:36 +0000 | |
---|---|---|
committer | 2012-09-05 17:13:36 +0000 | |
commit | 1aa8154cae81806cf43f8627d9501bcd6d5b19f4 (patch) | |
tree | d5f8092a6c48f93cc47b6b6fc7e5dca2aee2da50 /sys/compat/linux/linux_resource.c | |
parent | struct omount can die; ok guenther (diff) | |
download | wireguard-openbsd-1aa8154cae81806cf43f8627d9501bcd6d5b19f4.tar.xz wireguard-openbsd-1aa8154cae81806cf43f8627d9501bcd6d5b19f4.zip |
struct orlimit is only used by linux compat now, and can stop polluting
the system .h files
Diffstat (limited to 'sys/compat/linux/linux_resource.c')
-rw-r--r-- | sys/compat/linux/linux_resource.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_resource.c b/sys/compat/linux/linux_resource.c index 11c86d852ca..e07433aa2fb 100644 --- a/sys/compat/linux/linux_resource.c +++ b/sys/compat/linux/linux_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_resource.c,v 1.5 2011/07/07 01:19:39 tedu Exp $ */ +/* $OpenBSD: linux_resource.c,v 1.6 2012/09/05 17:13:37 deraadt Exp $ */ /* * Copyright (c) 2000 Niklas Hallqvist @@ -73,17 +73,23 @@ struct compat_sys_setrlimit_args { syscallarg(int) which; syscallarg(struct olimit *) rlp; }; + +struct compat_linux_rlimit { + int32_t rlim_cur; /* current (soft) limit */ + int32_t rlim_max; /* maximum value for rlim_cur */ +}; + int compat_sys_setrlimit(struct proc *p, void *v, register_t *retval); int compat_sys_setrlimit(struct proc *p, void *v, register_t *retval) { struct compat_sys_setrlimit_args *uap = v; - struct orlimit olim; + struct compat_linux_rlimit olim; struct rlimit lim; int error; error = copyin((caddr_t)SCARG(uap, rlp), (caddr_t)&olim, - sizeof (struct orlimit)); + sizeof (olim)); if (error) return (error); lim.rlim_cur = olim.rlim_cur; |