fix rlimit calls for ultrix compat; untested, but should work

This commit is contained in:
cgd 1994-05-05 03:31:07 +00:00
parent 2bb2cb3a72
commit 05a7ffd00c
2 changed files with 35 additions and 6 deletions

View File

@ -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

View File

@ -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 */