From 05a7ffd00cecb903739206eaf01c72947ae7d3de Mon Sep 17 00:00:00 2001 From: cgd Date: Thu, 5 May 1994 03:31:07 +0000 Subject: [PATCH] fix rlimit calls for ultrix compat; untested, but should work --- sys/arch/pmax/ultrix/ultrix_compat.c | 31 +++++++++++++++++++++++++++- sys/arch/pmax/ultrix/ultrix_sysent.c | 10 ++++----- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/sys/arch/pmax/ultrix/ultrix_compat.c b/sys/arch/pmax/ultrix/ultrix_compat.c index a036ae6bbcad..b4a1ff11b89b 100644 --- a/sys/arch/pmax/ultrix/ultrix_compat.c +++ b/sys/arch/pmax/ultrix/ultrix_compat.c @@ -37,7 +37,7 @@ * * from: Utah Hdr: hpux_compat.c 1.41 91/04/06 * from: @(#)ultrix_compat.c 7.4 (Berkeley) 10/11/92 - * $Id: ultrix_compat.c,v 1.1.1.1 1993/10/12 03:22:47 deraadt Exp $ + * $Id: ultrix_compat.c,v 1.2 1994/05/05 03:31:07 cgd Exp $ */ /* @@ -279,4 +279,33 @@ ultrixgetsysinfo(p, uap, retval) return (0); } +#define ULTRIX_RLIM_NLIMITS 6 /* ultrix only has _CPU -> _RSS */ + +struct ultrix_getrlimit_args { + int which; + struct orlimit *rlp; +}; +ultrixgetrlimit(p, uap, retval) + struct proc *p; + struct ultrix_getrlimit_args *uap; + int *retval; +{ + if (uap->which >= ULTRIX_RLIM_NLIMITS) + return EINVAL; + return ogetrlimit(p, uap, retval); +} + +struct ultrix_setrlimit_args { + int which; + struct orlimit *rlp; +}; +ultrixsetrlimit(p, uap, retval) + struct proc *p; + struct ultrix_getrlimit_args *uap; + int *retval; +{ + if (uap->which >= ULTRIX_RLIM_NLIMITS) + return EINVAL; + return osetrlimit(p, uap, retval); +} #endif diff --git a/sys/arch/pmax/ultrix/ultrix_sysent.c b/sys/arch/pmax/ultrix/ultrix_sysent.c index 9d645564cbac..356cb203664f 100644 --- a/sys/arch/pmax/ultrix/ultrix_sysent.c +++ b/sys/arch/pmax/ultrix/ultrix_sysent.c @@ -37,7 +37,7 @@ * * from: Utah Hdr: hpux_sysent.c 1.1 90/07/09 * from: @(#)ultrix_sysent.c 7.5 (Berkeley) 10/11/92 - * $Id: ultrix_sysent.c,v 1.1.1.1 1993/10/12 03:22:47 deraadt Exp $ + * $Id: ultrix_sysent.c,v 1.2 1994/05/05 03:31:09 cgd Exp $ */ /* @@ -146,8 +146,8 @@ int adjtime(); int ogetpeername(); int gethostid(); int sethostid(); -int getrlimit(); -int setrlimit(); +int ultrixgetrlimit(); +int ultrixsetrlimit(); int okillpg(); int ogetsockname(); int ogetdirentries(); @@ -307,8 +307,8 @@ struct sysent ultrixsysent[] = { 3, ogetpeername, /* 141 = getpeername */ 2, gethostid, /* 142 = gethostid */ 2, sethostid, /* 143 = sethostid */ - 2, getrlimit, /* 144 = getrlimit */ - 2, setrlimit, /* 145 = setrlimit */ + 2, ultrixgetrlimit, /* 144 = getrlimit */ + 2, ultrixsetrlimit, /* 145 = setrlimit */ 2, okillpg, /* 146 = killpg */ 0, nosys, /* 147 = nosys */ 0, notimp, /* 148 = setquota */