Subject: irix compat
To: None <port-sgimips@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: port-sgimips
Date: 06/03/2005 12:30:26
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Any comments on the patch below?
Martin
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: irix_resource.c
===================================================================
RCS file: /cvsroot/src/sys/compat/irix/irix_resource.c,v
retrieving revision 1.4
diff -c -u -r1.4 irix_resource.c
--- irix_resource.c 26 Feb 2005 23:10:18 -0000 1.4
+++ irix_resource.c 3 Jun 2005 10:27:43 -0000
@@ -188,7 +188,7 @@
{
struct irix_sys_getrlimit_args /* {
syscallarg(int) resource;
- syscallarg(struct irix_rlimit *) rlp;
+ syscallarg(const struct irix_rlimit *) rlp;
} */ *uap = v;
struct proc *p = l->l_proc;
caddr_t sg = stackgap_init(p, 0);
@@ -213,9 +213,6 @@
else
rlp.rlim_max = irlp.rlim_cur;
- if ((error = copyout(&rlp, (void *)SCARG(&cup, rlp), sizeof(rlp))) != 0)
- return error;
-
if ((error = sys_setrlimit(l, &cup, retval)) != 0)
return error;
@@ -230,7 +227,7 @@
{
struct irix_sys_getrlimit_args /* {
syscallarg(int) resource;
- syscallarg(struct irix_rlimit64 *) rlp;
+ syscallarg(const struct irix_rlimit64 *) rlp;
} */ *uap = v;
struct proc *p = l->l_proc;
caddr_t sg = stackgap_init(p, 0);
@@ -255,9 +252,6 @@
else
rlp.rlim_max = irlp.rlim_cur;
- if ((error = copyout(&rlp, (void *)SCARG(&cup, rlp), sizeof(rlp))) != 0)
- return error;
-
if ((error = sys_setrlimit(l, &cup, retval)) != 0)
return error;
Index: irix_signal.c
===================================================================
RCS file: /cvsroot/src/sys/compat/irix/irix_signal.c,v
retrieving revision 1.32
diff -c -u -r1.32 irix_signal.c
--- irix_signal.c 26 Feb 2005 23:10:18 -0000 1.32
+++ irix_signal.c 3 Jun 2005 10:27:43 -0000
@@ -927,7 +927,7 @@
{
struct irix_sys_sigprocmask_args /* {
syscallarg(int) how;
- syscallarg(irix_sigset_t *) set;
+ syscallarg(const irix_sigset_t *) set;
syscallarg(irix_sigset_t *) oset;
} */ *uap = v;
struct proc *p = l->l_proc;
@@ -938,7 +938,7 @@
caddr_t sg;
SCARG(&cup, how) = SCARG(uap, how);
- SCARG(&cup, set) = (svr4_sigset_t *)SCARG(uap, set);
+ SCARG(&cup, set) = (const svr4_sigset_t *)SCARG(uap, set);
SCARG(&cup, oset) = (svr4_sigset_t *)SCARG(uap, oset);
if (SCARG(uap, how) == IRIX_SIG_SETMASK32) {
@@ -952,7 +952,7 @@
/* preserve the higher 32 bits */
niss.bits[3] = oiss.bits[3];
- if ((error = copyout(&niss, (void *)SCARG(&cup, set),
+ if ((error = copyout(&niss, SCARG(&cup, oset),
sizeof(niss))) != 0)
return error;
--vkogqOf2sHV7VnPd--