From 7cccbece0514c39b970dabc75facdcbbf5aeacda Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 5 Sep 2012 17:13:38 +0000 Subject: struct orlimit is only used by linux compat now, and can stop polluting the system .h files --- sys/compat/linux/linux_resource.c | 12 +++++++++--- sys/sys/resource.h | 7 +------ 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'sys') 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; diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 4384a41fc43..a1e5d6b1bd4 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resource.h,v 1.9 2010/11/02 10:51:06 kettenis Exp $ */ +/* $OpenBSD: resource.h,v 1.10 2012/09/05 17:13:36 deraadt Exp $ */ /* $NetBSD: resource.h,v 1.14 1996/02/09 18:25:27 christos Exp $ */ /* @@ -95,11 +95,6 @@ struct rusage { #define RLIM_SAVED_MAX RLIM_INFINITY #define RLIM_SAVED_CUR RLIM_INFINITY -struct orlimit { - int32_t rlim_cur; /* current (soft) limit */ - int32_t rlim_max; /* maximum value for rlim_cur */ -}; - struct rlimit { rlim_t rlim_cur; /* current (soft) limit */ rlim_t rlim_max; /* maximum value for rlim_cur */ -- cgit v1.2.3