Fix 'struct lwp *' lossage.
This commit is contained in:
parent
fe57fb71a2
commit
0a144cd97c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_fs.c,v 1.25 2003/01/18 08:49:22 thorpej Exp $ */
|
||||
/* $NetBSD: ultrix_fs.c,v 1.26 2003/06/29 09:42:10 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1997 Jonathan Stone
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.25 2003/01/18 08:49:22 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.26 2003/06/29 09:42:10 simonb Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -210,7 +210,6 @@ ultrix_sys_getmnt(l, v, retval)
|
|||
register_t *retval;
|
||||
{
|
||||
struct ultrix_sys_getmnt_args *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct mount *mp, *nmp;
|
||||
struct statfs *sp;
|
||||
struct ultrix_fs_data *sfsp;
|
||||
|
@ -274,7 +273,7 @@ ultrix_sys_getmnt(l, v, retval)
|
|||
* If requested, refresh the fsstat cache.
|
||||
*/
|
||||
if (mntflags != MNT_WAIT &&
|
||||
(error = VFS_STATFS(mp, sp, p)) != 0)
|
||||
(error = VFS_STATFS(mp, sp, l)) != 0)
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_ioctl.c,v 1.21 2003/05/07 14:21:20 christos Exp $ */
|
||||
/* $NetBSD: ultrix_ioctl.c,v 1.22 2003/06/29 09:42:10 simonb Exp $ */
|
||||
/* from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
|
||||
|
||||
/*
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.21 2003/05/07 14:21:20 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.22 2003/06/29 09:42:10 simonb Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_ultrix.h"
|
||||
|
@ -455,10 +455,9 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
register_t *retval;
|
||||
{
|
||||
struct ultrix_sys_ioctl_args *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct filedesc *fdp = l->l_proc->p_fd;
|
||||
struct file *fp;
|
||||
int (*ctl)(struct file *, u_long, void *, struct proc *);
|
||||
int (*ctl)(struct file *, u_long, void *, struct lwp *);
|
||||
int error;
|
||||
|
||||
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
|
||||
|
@ -487,7 +486,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
if (disc)
|
||||
return ENXIO;
|
||||
|
||||
return (*ctl)(fp, TIOCSETD, &disc, p);
|
||||
return (*ctl)(fp, TIOCSETD, &disc, l);
|
||||
}
|
||||
case _IOW('t', 101, int): /* sun SUNOS_TIOCSSOFTCAR */
|
||||
{
|
||||
|
@ -504,14 +503,14 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
case _IO('t', 36): /* sun TIOCCONS, no parameters */
|
||||
{
|
||||
int on = 1;
|
||||
return (*ctl)(fp, TIOCCONS, &on, p);
|
||||
return (*ctl)(fp, TIOCCONS, &on, l);
|
||||
}
|
||||
case _IOW('t', 37, struct sunos_ttysize):
|
||||
{
|
||||
struct winsize ws;
|
||||
struct sunos_ttysize ss;
|
||||
|
||||
if ((error = (*ctl)(fp, TIOCGWINSZ, &ws, p)) != 0)
|
||||
if ((error = (*ctl)(fp, TIOCGWINSZ, &ws, l)) != 0)
|
||||
return (error);
|
||||
|
||||
if ((error = copyin(SCARG(uap, data), &ss, sizeof (ss))) != 0)
|
||||
|
@ -520,14 +519,14 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
ws.ws_row = ss.ts_row;
|
||||
ws.ws_col = ss.ts_col;
|
||||
|
||||
return (*ctl)(fp, TIOCSWINSZ, &ws, p);
|
||||
return (*ctl)(fp, TIOCSWINSZ, &ws, l);
|
||||
}
|
||||
case _IOW('t', 38, struct sunos_ttysize):
|
||||
{
|
||||
struct winsize ws;
|
||||
struct sunos_ttysize ss;
|
||||
|
||||
if ((error = (*ctl)(fp, TIOCGWINSZ, &ws, p)) != 0)
|
||||
if ((error = (*ctl)(fp, TIOCGWINSZ, &ws, l)) != 0)
|
||||
return (error);
|
||||
|
||||
ss.ts_row = ws.ws_row;
|
||||
|
@ -550,7 +549,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
struct ultrix_termios sts;
|
||||
struct ultrix_termio st;
|
||||
|
||||
if ((error = (*ctl)(fp, TIOCGETA, &bts, p)) != 0)
|
||||
if ((error = (*ctl)(fp, TIOCGETA, &bts, l)) != 0)
|
||||
return error;
|
||||
|
||||
btios2stios (&bts, &sts);
|
||||
|
@ -575,7 +574,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
return error;
|
||||
|
||||
/* get full BSD termios so we don't lose information */
|
||||
if ((error = (*ctl)(fp, TIOCGETA, &bts, p)) != 0)
|
||||
if ((error = (*ctl)(fp, TIOCGETA, &bts, l)) != 0)
|
||||
return error;
|
||||
|
||||
/*
|
||||
|
@ -591,10 +590,10 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
*/
|
||||
#ifdef notyet
|
||||
return (*ctl)(fp, ULTRIX_TCSETA - SCARG(uap, com) + TIOCSETA,
|
||||
&bts, p);
|
||||
&bts, l);
|
||||
#else
|
||||
result= (*ctl)(fp, ULTRIX_TCSETA - SCARG(uap, com) + TIOCSETA,
|
||||
&bts, p);
|
||||
&bts, l);
|
||||
printf("ultrix TCSETA %lx returns %d\n",
|
||||
ULTRIX_TCSETA - SCARG(uap, com), result);
|
||||
return result;
|
||||
|
@ -613,7 +612,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
return error;
|
||||
stios2btios (&sts, &bts);
|
||||
return (*ctl)(fp, ULTRIX_TCSETS - SCARG(uap, com) + TIOCSETA,
|
||||
&bts, p);
|
||||
&bts, l);
|
||||
}
|
||||
/*
|
||||
* Pseudo-tty ioctl translations.
|
||||
|
@ -624,7 +623,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
error = copyin(SCARG(uap, data), &on, sizeof (on));
|
||||
if (error != 0)
|
||||
return error;
|
||||
return (*ctl)(fp, TIOCUCNTL, &on, p);
|
||||
return (*ctl)(fp, TIOCUCNTL, &on, l);
|
||||
}
|
||||
case _IOW('t', 33, int): { /* TIOCSIGNAL */
|
||||
int error, sig;
|
||||
|
@ -632,7 +631,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
error = copyin(SCARG(uap, data), &sig, sizeof (sig));
|
||||
if (error != 0)
|
||||
return error;
|
||||
return (*ctl)(fp, TIOCSIG, &sig, p);
|
||||
return (*ctl)(fp, TIOCSIG, &sig, l);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -643,7 +642,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
if ((error = copyin(SCARG(uap, data), \
|
||||
&localbuf, sizeof (type_t))) != 0) \
|
||||
return error; \
|
||||
return (*ctl)(fp, a, &localbuf, p); \
|
||||
return (*ctl)(fp, a, &localbuf, l); \
|
||||
}
|
||||
|
||||
#define INOUT_TYPE(a, type_t) { \
|
||||
|
@ -651,7 +650,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
if ((error = copyin(SCARG(uap, data), &localbuf, \
|
||||
sizeof (type_t))) != 0) \
|
||||
return error; \
|
||||
if ((error = (*ctl)(fp, a, &localbuf, p)) != 0) \
|
||||
if ((error = (*ctl)(fp, a, &localbuf, l)) != 0) \
|
||||
return error; \
|
||||
return copyout(&localbuf, SCARG(uap, data), sizeof (type_t)); \
|
||||
}
|
||||
|
@ -661,14 +660,14 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
struct ifreq ifreq; \
|
||||
if ((error = copyin(SCARG(uap, data), &ifreq, sizeof (ifreq))) != 0) \
|
||||
return error; \
|
||||
return (*ctl)(fp, a, &ifreq, p); \
|
||||
return (*ctl)(fp, a, &ifreq, l); \
|
||||
}
|
||||
|
||||
#define IFREQ_INOUT(a) { \
|
||||
struct ifreq ifreq; \
|
||||
if ((error = copyin(SCARG(uap, data), &ifreq, sizeof (ifreq))) != 0) \
|
||||
return error; \
|
||||
if ((error = (*ctl)(fp, a, &ifreq, p)) != 0) \
|
||||
if ((error = (*ctl)(fp, a, &ifreq, l)) != 0) \
|
||||
return error; \
|
||||
return copyout(&ifreq, SCARG(uap, data), sizeof (ifreq)); \
|
||||
}
|
||||
|
@ -713,7 +712,7 @@ ultrix_sys_ioctl(l, v, retval)
|
|||
error = copyin(SCARG(uap, data), &ifconf, sizeof (ifconf));
|
||||
if (error)
|
||||
return error;
|
||||
error = (*ctl)(fp, OSIOCGIFCONF, &ifconf, p);
|
||||
error = (*ctl)(fp, OSIOCGIFCONF, &ifconf, l);
|
||||
if (error)
|
||||
return error;
|
||||
return copyout(&ifconf, SCARG(uap, data), sizeof (ifconf));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_misc.c,v 1.83 2003/01/29 07:00:40 atatat Exp $ */
|
||||
/* $NetBSD: ultrix_misc.c,v 1.84 2003/06/29 09:42:11 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
|
||||
|
@ -80,7 +80,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.83 2003/01/29 07:00:40 atatat Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.84 2003/06/29 09:42:11 simonb Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_nfsserver.h"
|
||||
|
@ -411,7 +411,7 @@ ultrix_sys_setsockopt(l, v, retval)
|
|||
error = sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
|
||||
SCARG(uap, name), m);
|
||||
out:
|
||||
FILE_UNUSE(fp, p);
|
||||
FILE_UNUSE(fp, l);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_pathname.c,v 1.16 2003/06/28 14:21:28 darrenr Exp $ */
|
||||
/* $NetBSD: ultrix_pathname.c,v 1.17 2003/06/29 09:42:11 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -63,7 +63,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.16 2003/06/28 14:21:28 darrenr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.17 2003/06/29 09:42:11 simonb Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -233,7 +233,7 @@ ultrix_sys_open(l, v, retval)
|
|||
|
||||
/* ignore any error, just give it a try */
|
||||
if (fp != NULL && fp->f_type == DTYPE_VNODE)
|
||||
(fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t)0, p);
|
||||
(fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t)0, l);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ ultrix_sys_statfs(l, v, retval)
|
|||
mp = nd.ni_vp->v_mount;
|
||||
sp = &mp->mnt_stat;
|
||||
vrele(nd.ni_vp);
|
||||
if ((error = VFS_STATFS(mp, sp, p)) != 0)
|
||||
if ((error = VFS_STATFS(mp, sp, l)) != 0)
|
||||
return (error);
|
||||
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
|
||||
return ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
|
||||
|
@ -329,12 +329,12 @@ ultrix_sys_fstatfs(l, v, retval)
|
|||
return (error);
|
||||
mp = ((struct vnode *)fp->f_data)->v_mount;
|
||||
sp = &mp->mnt_stat;
|
||||
if ((error = VFS_STATFS(mp, sp, p)) != 0)
|
||||
if ((error = VFS_STATFS(mp, sp, l)) != 0)
|
||||
goto out;
|
||||
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
|
||||
error = ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
|
||||
out:
|
||||
FILE_UNUSE(fp, p);
|
||||
FILE_UNUSE(fp, l);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue