diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-09-05 17:13:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-09-05 17:13:38 +0000 |
commit | 7cccbece0514c39b970dabc75facdcbbf5aeacda (patch) | |
tree | d0ac63763804e348d7d95a0ebb4109f13ffb66f9 /sys/compat/linux | |
parent | 2b44ff26f6fda62d27057435dde3c9c89c6febed (diff) |
struct orlimit is only used by linux compat now, and can stop polluting
the system .h files
Diffstat (limited to 'sys/compat/linux')
-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; |