Adapt to ktrace/lwp changes.

This commit is contained in:
thorpej 2003-06-29 15:49:49 +00:00
parent e3165e7ebd
commit f4fff81d3a
21 changed files with 207 additions and 208 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ac.c,v 1.18 2002/10/23 09:11:02 jdolecek Exp $ */
/* $NetBSD: ac.c,v 1.19 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ac.c,v 1.18 2002/10/23 09:11:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ac.c,v 1.19 2003/06/29 15:58:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -186,10 +186,10 @@ acattach(parent, self, aux)
/*ARGSUSED*/
int
acopen(dev, flag, mode, p)
acopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = minor(dev);
struct ac_softc *sc;
@ -215,10 +215,10 @@ acopen(dev, flag, mode, p)
/*ARGSUSED*/
int
acclose(dev, flag, mode, p)
acclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct ac_softc *sc = ac_cd.cd_devs[minor(dev)];
@ -231,12 +231,12 @@ acclose(dev, flag, mode, p)
/*ARGSUSED*/
int
acioctl(dev, cmd, data, flag, p)
acioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct ac_softc *sc = ac_cd.cd_devs[minor(dev)];
char *dp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: apci.c,v 1.22 2003/03/06 18:24:52 thorpej Exp $ */
/* $NetBSD: apci.c,v 1.23 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc.
@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: apci.c,v 1.22 2003/03/06 18:24:52 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: apci.c,v 1.23 2003/06/29 15:58:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -302,10 +302,10 @@ apciattach(parent, self, aux)
/* ARGSUSED */
int
apciopen(dev, flag, mode, p)
apciopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = APCIUNIT(dev);
struct apci_softc *sc;
@ -331,7 +331,7 @@ apciopen(dev, flag, mode, p)
if ((tp->t_state & TS_ISOPEN) &&
(tp->t_state & TS_XCLUDE) &&
p->p_ucred->cr_uid != 0)
l->l_proc->p_ucred->cr_uid != 0)
return (EBUSY);
s = spltty();
@ -394,10 +394,10 @@ apciopen(dev, flag, mode, p)
/* ARGSUSED */
int
apciclose(dev, flag, mode, p)
apciclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct apci_softc *sc;
struct tty *tp;
@ -455,15 +455,15 @@ apciwrite(dev, uio, flag)
}
int
apcipoll(dev, events, p)
apcipoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct apci_softc *sc = apci_cd.cd_devs[APCIUNIT(dev)];
struct tty *tp = sc->sc_tty;
return ((*tp->t_linesw->l_poll)(tp, events, p));
return ((*tp->t_linesw->l_poll)(tp, events, l));
}
struct tty *
@ -595,23 +595,23 @@ apcimint(sc, stat)
}
int
apciioctl(dev, cmd, data, flag, p)
apciioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct apci_softc *sc = apci_cd.cd_devs[APCIUNIT(dev)];
struct tty *tp = sc->sc_tty;
struct apciregs *apci = sc->sc_apci;
int error;
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
error = ttioctl(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
@ -664,7 +664,7 @@ apciioctl(dev, cmd, data, flag, p)
case TIOCSFLAGS: {
int userbits;
error = suser(p->p_ucred, &p->p_acflag);
error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag);
if (error)
return (EPERM);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ct.c,v 1.33 2002/10/23 09:11:02 jdolecek Exp $ */
/* $NetBSD: ct.c,v 1.34 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.33 2002/10/23 09:11:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.34 2003/06/29 15:58:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -371,10 +371,10 @@ ctreset(sc)
/*ARGSUSED*/
int
ctopen(dev, flag, type, p)
ctopen(dev, flag, type, l)
dev_t dev;
int flag, type;
struct proc *p;
struct lwp *l;
{
struct ct_softc *sc;
u_char stat;
@ -413,17 +413,17 @@ ctopen(dev, flag, type, p)
if (cc != sizeof(stat))
return(EBUSY);
sc->sc_tpr = tprintf_open(p);
sc->sc_tpr = tprintf_open(l->l_proc);
sc->sc_flags |= CTF_OPEN;
return(0);
}
/*ARGSUSED*/
int
ctclose(dev, flag, fmt, p)
ctclose(dev, flag, fmt, l)
dev_t dev;
int flag, fmt;
struct proc *p;
struct lwp *l;
{
struct ct_softc *sc = ct_cd.cd_devs[UNIT(dev)];
@ -925,12 +925,12 @@ ctwrite(dev, uio, flags)
/*ARGSUSED*/
int
ctioctl(dev, cmd, data, flag, p)
ctioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
int flag;
caddr_t data;
struct proc *p;
struct lwp *l;
{
struct mtop *op;
int cnt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dca.c,v 1.55 2003/05/24 06:21:22 gmcgarry Exp $ */
/* $NetBSD: dca.c,v 1.56 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dca.c,v 1.55 2003/05/24 06:21:22 gmcgarry Exp $");
__KERNEL_RCSID(0, "$NetBSD: dca.c,v 1.56 2003/06/29 15:58:19 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -343,10 +343,10 @@ dcaattach(parent, self, aux)
/* ARGSUSED */
int
dcaopen(dev, flag, mode, p)
dcaopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = DCAUNIT(dev);
struct dca_softc *sc;
@ -375,7 +375,7 @@ dcaopen(dev, flag, mode, p)
if ((tp->t_state & TS_ISOPEN) &&
(tp->t_state & TS_XCLUDE) &&
p->p_ucred->cr_uid != 0)
l->l_proc->p_ucred->cr_uid != 0)
return (EBUSY);
s = spltty();
@ -432,10 +432,10 @@ dcaopen(dev, flag, mode, p)
/*ARGSUSED*/
int
dcaclose(dev, flag, mode, p)
dcaclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct dca_softc *sc;
struct tty *tp;
@ -512,15 +512,15 @@ dcawrite(dev, uio, flag)
}
int
dcapoll(dev, events, p)
dcapoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct dca_softc *sc = dca_cd.cd_devs[DCAUNIT(dev)];
struct tty *tp = sc->sc_tty;
return ((*tp->t_linesw->l_poll)(tp, events, p));
return ((*tp->t_linesw->l_poll)(tp, events, l));
}
struct tty *
@ -706,12 +706,12 @@ dcamint(sc)
}
int
dcaioctl(dev, cmd, data, flag, p)
dcaioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
int unit = DCAUNIT(dev);
struct dca_softc *sc = dca_cd.cd_devs[unit];
@ -719,11 +719,11 @@ dcaioctl(dev, cmd, data, flag, p)
struct dcadevice *dca = sc->sc_dca;
int error;
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
error = ttioctl(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
@ -776,7 +776,7 @@ dcaioctl(dev, cmd, data, flag, p)
case TIOCSFLAGS: {
int userbits;
error = suser(p->p_ucred, &p->p_acflag);
error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag);
if (error)
return (EPERM);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dcm.c,v 1.59 2003/05/24 06:21:22 gmcgarry Exp $ */
/* $NetBSD: dcm.c,v 1.60 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.59 2003/05/24 06:21:22 gmcgarry Exp $");
__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.60 2003/06/29 15:58:19 thorpej Exp $");
#include "opt_kgdb.h"
@ -491,10 +491,10 @@ dcmattach(parent, self, aux)
/* ARGSUSED */
int
dcmopen(dev, flag, mode, p)
dcmopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct dcm_softc *sc;
struct tty *tp;
@ -524,7 +524,7 @@ dcmopen(dev, flag, mode, p)
if ((tp->t_state & TS_ISOPEN) &&
(tp->t_state & TS_XCLUDE) &&
p->p_ucred->cr_uid != 0)
l->l_proc->p_ucred->cr_uid != 0)
return (EBUSY);
s = spltty();
@ -586,10 +586,10 @@ dcmopen(dev, flag, mode, p)
/*ARGSUSED*/
int
dcmclose(dev, flag, mode, p)
dcmclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int s, unit, board, port;
struct dcm_softc *sc;
@ -665,10 +665,10 @@ dcmwrite(dev, uio, flag)
}
int
dcmpoll(dev, events, p)
dcmpoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
int unit, board, port;
struct dcm_softc *sc;
@ -681,7 +681,7 @@ dcmpoll(dev, events, p)
sc = dcm_cd.cd_devs[board];
tp = sc->sc_tty[port];
return ((*tp->t_linesw->l_poll)(tp, events, p));
return ((*tp->t_linesw->l_poll)(tp, events, l));
}
struct tty *
@ -991,12 +991,12 @@ dcmmint(sc, port, mcnd)
}
int
dcmioctl(dev, cmd, data, flag, p)
dcmioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct dcm_softc *sc;
struct tty *tp;
@ -1017,11 +1017,11 @@ dcmioctl(dev, cmd, data, flag, p)
sc->sc_dev.dv_xname, port, cmd, *data, flag);
#endif
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
error = ttioctl(tp, cmd, data, flag, l);
if (error != EPASSTHROUGH)
return (error);
@ -1087,7 +1087,7 @@ dcmioctl(dev, cmd, data, flag, p)
case TIOCSFLAGS: {
int userbits;
error = suser(p->p_ucred, &p->p_acflag);
error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag);
if (error)
return (EPERM);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.51 2003/02/23 19:08:18 he Exp $ */
/* $NetBSD: grf.c,v 1.52 2003/06/29 15:58:19 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.51 2003/02/23 19:08:18 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.52 2003/06/29 15:58:19 thorpej Exp $");
#include "opt_compat_hpux.h"
@ -165,10 +165,10 @@ grfprint(aux, pnp)
/*ARGSUSED*/
int
grfopen(dev, flags, mode, p)
grfopen(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
int unit = GRFUNIT(dev);
struct grf_softc *sc;
@ -190,7 +190,7 @@ grfopen(dev, flags, mode, p)
/*
* XXX: cannot handle both HPUX and BSD processes at the same time
*/
if (p->p_emul == &emul_hpux)
if (l->l_proc->p_emul == &emul_hpux)
if (gp->g_flags & GF_BSDOPEN)
return(EBUSY);
else
@ -215,10 +215,10 @@ grfopen(dev, flags, mode, p)
/*ARGSUSED*/
int
grfclose(dev, flags, mode, p)
grfclose(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
int unit = GRFUNIT(dev);
struct grf_softc *sc;
@ -241,12 +241,12 @@ grfclose(dev, flags, mode, p)
/*ARGSUSED*/
int
grfioctl(dev, cmd, data, flag, p)
grfioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
int flag;
caddr_t data;
struct proc *p;
struct lwp *l;
{
struct grf_softc *sc;
struct grf_data *gp;
@ -260,8 +260,8 @@ grfioctl(dev, cmd, data, flag, p)
return (ENXIO);
#ifdef COMPAT_HPUX
if (p->p_emul == &emul_hpux)
return(hpuxgrfioctl(dev, cmd, data, flag, p));
if (l->l_proc->p_emul == &emul_hpux)
return(hpuxgrfioctl(dev, cmd, data, flag, l));
#endif
error = 0;
switch (cmd) {
@ -279,11 +279,11 @@ grfioctl(dev, cmd, data, flag, p)
break;
case GRFIOCMAP:
error = grfmap(dev, (caddr_t *)data, p);
error = grfmap(dev, (caddr_t *)data, l->l_proc);
break;
case GRFIOCUNMAP:
error = grfunmap(dev, *(caddr_t *)data, p);
error = grfunmap(dev, *(caddr_t *)data, l->l_proc);
break;
default:
@ -377,11 +377,11 @@ grfaddr(sc, off)
/*ARGSUSED*/
int
hpuxgrfioctl(dev, cmd, data, flag, p)
hpuxgrfioctl(dev, cmd, data, flag, l)
dev_t dev;
int cmd, flag;
caddr_t data;
struct proc *p;
struct lwp *l;
{
struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)];
struct grf_data *gp = sc->sc_data;
@ -421,11 +421,11 @@ hpuxgrfioctl(dev, cmd, data, flag, p)
/* map in control regs and frame buffer */
case GCMAP:
error = grfmap(dev, (caddr_t *)data, p);
error = grfmap(dev, (caddr_t *)data, l->l_proc);
break;
case GCUNMAP:
error = grfunmap(dev, *(caddr_t *)data, p);
error = grfunmap(dev, *(caddr_t *)data, l->l_proc);
/* XXX: HP-UX uses GCUNMAP to get rid of GCSLOT memory */
if (error)
error = grflckunmmap(dev, *(caddr_t *)data);

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfvar.h,v 1.14 2001/12/14 08:34:28 gmcgarry Exp $ */
/* $NetBSD: grfvar.h,v 1.15 2003/06/29 15:58:19 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -137,7 +137,7 @@ paddr_t grfaddr __P((struct grf_softc *, off_t));
#endif
#ifdef COMPAT_HPUX
int hpuxgrfioctl __P((dev_t, int, caddr_t, int, struct proc *));
int hpuxgrfioctl __P((dev_t, int, caddr_t, int, struct lwp *));
int grflock __P((struct grf_data *, int));
int grfunlock __P((struct grf_data *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: hil.c,v 1.57 2003/04/01 20:41:37 thorpej Exp $ */
/* $NetBSD: hil.c,v 1.58 2003/06/29 15:58:19 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hil.c,v 1.57 2003/04/01 20:41:37 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: hil.c,v 1.58 2003/06/29 15:58:19 thorpej Exp $");
#include "opt_compat_hpux.h"
#include "rnd.h"
@ -239,10 +239,10 @@ hilattach_deferred(self)
/* ARGSUSED */
int
hilopen(dev, flags, mode, p)
hilopen(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
struct hil_softc *hilp;
struct hilloopdev *dptr;
@ -278,7 +278,7 @@ hilopen(dev, flags, mode, p)
* Multiple processes can open the device.
*/
#ifdef COMPAT_HPUX
if (p->p_emul == &emul_hpux) {
if (l->l_proc->p_emul == &emul_hpux) {
if (dptr->hd_flags & (HIL_READIN|HIL_QUEUEIN))
return(EBUSY);
dptr->hd_flags |= HIL_READIN;
@ -320,10 +320,10 @@ hilopen(dev, flags, mode, p)
/* ARGSUSED */
int
hilclose(dev, flags, mode, p)
hilclose(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
struct hil_softc *hilp;
struct hilloopdev *dptr;
@ -343,20 +343,20 @@ hilclose(dev, flags, mode, p)
if (HILUNIT(dev) && (dptr->hd_flags & HIL_PSEUDO))
return (0);
if (p && p->p_emul == &emul_netbsd) {
if (l && l->l_proc->p_emul == &emul_netbsd) {
/*
* If this is the loop device,
* free up all queues belonging to this process.
*/
if (HILUNIT(dev) == 0) {
for (i = 0; i < NHILQ; i++)
if (hilp->hl_queue[i].hq_procp == p)
(void) hilqfree(hilp, i, p);
if (hilp->hl_queue[i].hq_procp == l->l_proc)
(void) hilqfree(hilp, i, l->l_proc);
} else {
mask = ~hildevmask(HILUNIT(dev));
s = splhil();
for (i = 0; i < NHILQ; i++)
if (hilp->hl_queue[i].hq_procp == p) {
if (hilp->hl_queue[i].hq_procp == l->l_proc) {
dptr->hd_qmask &= ~hilqmask(i);
hilp->hl_queue[i].hq_devmask &= mask;
}
@ -461,12 +461,12 @@ hilread(dev, uio, flag)
}
int
hilioctl(dev, cmd, data, flag, p)
hilioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct hil_softc *hilp;
struct hilloopdev *dptr;
@ -518,7 +518,7 @@ hilioctl(dev, cmd, data, flag, p)
}
#ifdef COMPAT_HPUX
if (p->p_emul == &emul_hpux)
if (l->l_proc->p_emul == &emul_hpux)
return(hpuxhilioctl(dev, cmd, data, flag));
#endif
@ -599,19 +599,20 @@ hilioctl(dev, cmd, data, flag, p)
break;
case HILIOCALLOCQ:
error = hilqalloc(hilp, (struct hilqinfo *)data, p);
error = hilqalloc(hilp, (struct hilqinfo *)data, l->l_proc);
break;
case HILIOCFREEQ:
error = hilqfree(hilp, ((struct hilqinfo *)data)->qid, p);
error = hilqfree(hilp, ((struct hilqinfo *)data)->qid,
l->l_proc);
break;
case HILIOCMAPQ:
error = hilqmap(hilp, *(int *)data, HILUNIT(dev), p);
error = hilqmap(hilp, *(int *)data, HILUNIT(dev), l->l_proc);
break;
case HILIOCUNMAPQ:
error = hilqunmap(hilp, *(int *)data, HILUNIT(dev), p);
error = hilqunmap(hilp, *(int *)data, HILUNIT(dev), l->l_proc);
break;
case HILIOCHPUX:
@ -771,10 +772,10 @@ hpuxhilioctl(dev, cmd, data, flag)
/*ARGSUSED*/
int
hilpoll(dev, events, p)
hilpoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct hil_softc *hilp;
struct hilloopdev *dptr;
@ -800,7 +801,7 @@ hilpoll(dev, events, p)
if (dptr->hd_queue.c_cc > 0)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &dptr->hd_selr);
selrecord(l, &dptr->hd_selr);
splx(s);
return (revents);
}
@ -828,14 +829,14 @@ hilpoll(dev, events, p)
*/
s = splhil();
for (qp = hilp->hl_queue; qp < &hilp->hl_queue[NHILQ]; qp++)
if (qp->hq_procp == p && (mask & qp->hq_devmask) &&
if (qp->hq_procp == l->l_proc && (mask & qp->hq_devmask) &&
qp->hq_eventqueue->hil_evqueue.head !=
qp->hq_eventqueue->hil_evqueue.tail) {
splx(s);
return (revents | (events & (POLLIN | POLLRDNORM)));
}
selrecord(p, &dptr->hd_selr);
selrecord(l, &dptr->hd_selr);
splx(s);
return (revents);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.58 2003/03/06 18:24:53 thorpej Exp $ */
/* $NetBSD: ite.c,v 1.59 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -85,7 +85,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.58 2003/03/06 18:24:53 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.59 2003/06/29 15:58:19 thorpej Exp $");
#include "hil.h"
@ -356,10 +356,10 @@ iteoff(ip, flag)
/* ARGSUSED */
int
iteopen(dev, mode, devtype, p)
iteopen(dev, mode, devtype, l)
dev_t dev;
int mode, devtype;
struct proc *p;
struct lwp *l;
{
int unit = ITEUNIT(dev);
struct tty *tp;
@ -379,7 +379,7 @@ iteopen(dev, mode, devtype, p)
} else
tp = ip->tty;
if ((tp->t_state&(TS_ISOPEN|TS_XCLUDE)) == (TS_ISOPEN|TS_XCLUDE)
&& p->p_ucred->cr_uid != 0)
&& l->l_proc->p_ucred->cr_uid != 0)
return (EBUSY);
if ((ip->flags & ITE_ACTIVE) == 0) {
error = iteon(ip, 0);
@ -411,10 +411,10 @@ iteopen(dev, mode, devtype, p)
/*ARGSUSED*/
int
iteclose(dev, flag, mode, p)
iteclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
struct ite_data *ip = sc->sc_data;
@ -456,15 +456,15 @@ itewrite(dev, uio, flag)
}
int
itepoll(dev, events, p)
itepoll(dev, events, l)
dev_t dev;
int events;
struct proc *p;
struct lwp *l;
{
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
struct tty *tp = sc->sc_data->tty;
return ((*tp->t_linesw->l_poll)(tp, events, p));
return ((*tp->t_linesw->l_poll)(tp, events, l));
}
struct tty *
@ -477,22 +477,22 @@ itetty(dev)
}
int
iteioctl(dev, cmd, addr, flag, p)
iteioctl(dev, cmd, addr, flag, l)
dev_t dev;
u_long cmd;
caddr_t addr;
int flag;
struct proc *p;
struct lwp *l;
{
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
struct ite_data *ip = sc->sc_data;
struct tty *tp = ip->tty;
int error;
error = (*tp->t_linesw->l_ioctl)(tp, cmd, addr, flag, p);
error = (*tp->t_linesw->l_ioctl)(tp, cmd, addr, flag, l);
if (error != EPASSTHROUGH)
return (error);
return ttioctl(tp, cmd, addr, flag, p);
return ttioctl(tp, cmd, addr, flag, l);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: mt.c,v 1.21 2002/10/23 09:11:07 jdolecek Exp $ */
/* $NetBSD: mt.c,v 1.22 2003/06/29 15:58:19 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.21 2002/10/23 09:11:07 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.22 2003/06/29 15:58:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -317,10 +317,10 @@ mtreaddsj(sc, ecmd)
}
int
mtopen(dev, flag, mode, p)
mtopen(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = UNIT(dev);
struct mt_softc *sc;
@ -337,7 +337,7 @@ mtopen(dev, flag, mode, p)
if (sc->sc_flags & MTF_OPEN)
return (EBUSY);
sc->sc_flags |= MTF_OPEN;
sc->sc_ttyp = tprintf_open(p);
sc->sc_ttyp = tprintf_open(l->l_proc);
if ((sc->sc_flags & MTF_ALIVE) == 0) {
error = mtcommand(dev, MTRESET, 0);
if (error != 0 || (sc->sc_flags & MTF_ALIVE) == 0)
@ -423,10 +423,10 @@ errout:
}
int
mtclose(dev, flag, fmt, p)
mtclose(dev, flag, fmt, l)
dev_t dev;
int flag, fmt;
struct proc *p;
struct lwp *l;
{
struct mt_softc *sc = mt_cd.cd_devs[UNIT(dev)];
@ -976,12 +976,12 @@ mtwrite(dev, uio, flags)
}
int
mtioctl(dev, cmd, data, flag, p)
mtioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct mtop *op;
int cnt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ppi.c,v 1.24 2002/10/23 09:11:07 jdolecek Exp $ */
/* $NetBSD: ppi.c,v 1.25 2003/06/29 15:58:20 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.24 2002/10/23 09:11:07 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.25 2003/06/29 15:58:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -209,10 +209,10 @@ ppinoop(arg)
}
int
ppiopen(dev, flags, fmt, p)
ppiopen(dev, flags, fmt, l)
dev_t dev;
int flags, fmt;
struct proc *p;
struct lwp *l;
{
int unit = UNIT(dev);
struct ppi_softc *sc;
@ -238,10 +238,10 @@ ppiopen(dev, flags, fmt, p)
}
int
ppiclose(dev, flags, fmt, p)
ppiclose(dev, flags, fmt, l)
dev_t dev;
int flags, fmt;
struct proc *p;
struct lwp *l;
{
int unit = UNIT(dev);
struct ppi_softc *sc = ppi_cd.cd_devs[unit];
@ -472,12 +472,12 @@ again:
}
int
ppiioctl(dev, cmd, data, flag, p)
ppiioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct ppi_softc *sc = ppi_cd.cd_devs[UNIT(dev)];
struct ppiparam *pp, *upp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rd.c,v 1.58 2003/05/03 18:10:47 wiz Exp $ */
/* $NetBSD: rd.c,v 1.59 2003/06/29 15:58:20 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.58 2003/05/03 18:10:47 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.59 2003/06/29 15:58:20 thorpej Exp $");
#include "opt_useleds.h"
#include "rnd.h"
@ -576,10 +576,10 @@ rdgetinfo(dev)
}
int
rdopen(dev, flags, mode, p)
rdopen(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
int unit = rdunit(dev);
struct rd_softc *rs;
@ -635,10 +635,10 @@ rdopen(dev, flags, mode, p)
}
int
rdclose(dev, flag, mode, p)
rdclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = rdunit(dev);
struct rd_softc *rs = rd_cd.cd_devs[unit];
@ -1147,12 +1147,12 @@ rdwrite(dev, uio, flags)
}
int
rdioctl(dev, cmd, data, flag, p)
rdioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
int unit = rdunit(dev);
struct rd_softc *sc = rd_cd.cd_devs[unit];

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.62 2003/06/28 14:20:50 darrenr Exp $ */
/* $NetBSD: sd.c,v 1.63 2003/06/29 15:58:20 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.62 2003/06/28 14:20:50 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.63 2003/06/29 15:58:20 thorpej Exp $");
#include "rnd.h"
#include "opt_useleds.h"
@ -510,10 +510,10 @@ sdgetinfo(dev)
}
int
sdopen(dev, flags, mode, p)
sdopen(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
int unit = sdunit(dev);
struct sd_softc *sc;
@ -569,10 +569,10 @@ sdopen(dev, flags, mode, p)
}
int
sdclose(dev, flag, mode, p)
sdclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
int unit = sdunit(dev);
struct sd_softc *sc = sd_cd.cd_devs[unit];
@ -1060,12 +1060,12 @@ sdwrite(dev, uio, flags)
}
int
sdioctl(dev, cmd, data, flag, p)
sdioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
int unit = sdunit(dev);
struct sd_softc *sc = sd_cd.cd_devs[unit];
@ -1126,13 +1126,13 @@ sdioctl(dev, cmd, data, flag, p)
case SDIOCSFORMAT:
/* take this device into or out of "format" mode */
if (suser(p->p_ucred, &p->p_acflag))
if (suser(l->l_proc->p_ucred, &l->l_proc->p_acflag))
return(EPERM);
if (*(int *)data) {
if (sc->sc_format_pid >= 0)
return (EPERM);
sc->sc_format_pid = p->p_pid;
sc->sc_format_pid = l->l_proc->p_pid;
} else
sc->sc_format_pid = -1;
return (0);
@ -1147,7 +1147,7 @@ sdioctl(dev, cmd, data, flag, p)
* Save what user gave us as SCSI cdb to use with next
* read or write to the char device.
*/
if (sc->sc_format_pid != p->p_pid)
if (sc->sc_format_pid != l->l_proc->p_pid)
return (EPERM);
if (legal_cmds[((struct scsi_fmt_cdb *)data)->cdb[0]] == 0)
return (EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: st.c,v 1.37 2003/05/03 18:10:48 wiz Exp $ */
/* $NetBSD: st.c,v 1.38 2003/06/29 15:58:20 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.37 2003/05/03 18:10:48 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.38 2003/06/29 15:58:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -360,10 +360,10 @@ stattach(parent, self, aux)
}
int
stopen(dev, flag, type, p)
stopen(dev, flag, type, l)
dev_t dev;
int flag, type;
struct proc *p;
struct lwp *l;
{
struct st_softc *sc;
struct st_xsense *xsense;
@ -399,7 +399,7 @@ stopen(dev, flag, type, p)
/*
* Be prepared to print error messages
*/
sc->sc_ctty = tprintf_open(p);
sc->sc_ctty = tprintf_open(l->l_proc);
/* do a mode sense to get current */
modlen = sc->sc_datalen[CMD_MODE_SENSE];
@ -658,10 +658,10 @@ retryselect:
/*ARGSUSED*/
int
stclose(dev, flag, mode, p)
stclose(dev, flag, mode, l)
dev_t dev;
int flag, mode;
struct proc *p;
struct lwp *l;
{
struct st_softc *sc = st_cd.cd_devs[UNIT(dev)];
int hit = 0;
@ -856,12 +856,12 @@ stwrite(dev, uio, flags)
/*ARGSUSED*/
int
stioctl(dev, cmd, data, flag, p)
stioctl(dev, cmd, data, flag, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
struct lwp *l;
{
struct st_softc *sc = st_cd.cd_devs[UNIT(dev)];
int cnt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_machdep.c,v 1.33 2003/06/28 14:20:51 darrenr Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.34 2003/06/29 15:58:20 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hpux_machdep.c,v 1.33 2003/06/28 14:20:51 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: hpux_machdep.c,v 1.34 2003/06/29 15:58:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -189,8 +189,8 @@ hpux_cpu_makecmds(l, epp)
* in ev->ev_len.
*/
int
hpux_cpu_vmcmd(p, ev)
struct proc *p;
hpux_cpu_vmcmd(l, ev)
struct lwp *l;
struct exec_vmcmd *ev;
{
struct hpux_exec *execp = (struct hpux_exec *)ev->ev_addr;
@ -205,10 +205,10 @@ hpux_cpu_vmcmd(p, ev)
/* Deal with misc. HP-UX process attributes. */
if (execp->ha_trsize & HPUXM_VALID) {
if (execp->ha_trsize & HPUXM_DATAWT)
p->p_md.mdp_flags &= ~MDP_CCBDATA;
l->l_proc->p_md.mdp_flags &= ~MDP_CCBDATA;
if (execp->ha_trsize & HPUXM_STKWT)
p->p_md.mdp_flags &= ~MDP_CCBSTACK;
l->l_proc->p_md.mdp_flags &= ~MDP_CCBSTACK;
}
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.170 2003/06/28 14:20:51 darrenr Exp $ */
/* $NetBSD: machdep.c,v 1.171 2003/06/29 15:58:20 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.170 2003/06/28 14:20:51 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 2003/06/29 15:58:20 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_compat_hpux.h"
@ -668,14 +668,14 @@ identifycpu()
* machine dependent system variables.
*/
int
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, l)
int *name;
u_int namelen;
void *oldp;
size_t *oldlenp;
void *newp;
size_t newlen;
struct proc *p;
struct lwp *l;
{
dev_t consdev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_machdep.h,v 1.14 2003/06/28 14:20:52 darrenr Exp $ */
/* $NetBSD: hpux_machdep.h,v 1.15 2003/06/29 15:58:21 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@ struct exec_package;
struct exec_vmcmd;
int hpux_cpu_makecmds __P((struct lwp *, struct exec_package *));
int hpux_cpu_vmcmd __P((struct proc *, struct exec_vmcmd *));
int hpux_cpu_vmcmd __P((struct lwp *, struct exec_vmcmd *));
int hpux_cpu_sysconf_arch __P((void));
int hpux_to_bsd_uoff __P((int *, int *, struct lwp *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.3 2003/04/02 00:00:46 thorpej Exp $ */
/* $NetBSD: vm_machdep.c,v 1.4 2003/06/29 15:49:49 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.3 2003/04/02 00:00:46 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.4 2003/06/29 15:49:49 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -186,7 +186,6 @@ cpu_coredump(l, vp, cred, chdr)
struct ucred *cred;
struct core *chdr;
{
struct proc *p = l->l_proc;
struct md_core md_core;
struct coreseg cseg;
int error;
@ -217,13 +216,13 @@ cpu_coredump(l, vp, cred, chdr)
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred,
NULL, p);
NULL, l);
if (error)
return error;
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core),
(off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE,
IO_NODELOCKED|IO_UNIT, cred, NULL, p);
IO_NODELOCKED|IO_UNIT, cred, NULL, l);
if (error)
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_compat.c,v 1.63 2003/06/28 14:21:18 darrenr Exp $ */
/* $NetBSD: hpux_compat.c,v 1.64 2003/06/29 15:54:32 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hpux_compat.c,v 1.63 2003/06/28 14:21:18 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: hpux_compat.c,v 1.64 2003/06/29 15:54:32 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -795,14 +795,14 @@ hpux_sys_ioctl(l, v, retval)
if ((*ofp & (HPUX_UF_NONBLOCK_ON|HPUX_UF_FNDELAY_ON)) == 0) {
tmp = *ofp & HPUX_UF_FIONBIO_ON;
error = (*fp->f_ops->fo_ioctl)(fp, FIONBIO,
(caddr_t)&tmp, p);
(caddr_t)&tmp, l);
}
break;
}
case HPUXTIOCCONS:
*(int *)dt = 1;
error = (*fp->f_ops->fo_ioctl)(fp, TIOCCONS, dt, p);
error = (*fp->f_ops->fo_ioctl)(fp, TIOCCONS, dt, l);
break;
/* BSD-style job control ioctls */
@ -823,7 +823,7 @@ hpux_sys_ioctl(l, v, retval)
case HPUXTIOCGWINSZ:
case HPUXTIOCSWINSZ:
error = (*fp->f_ops->fo_ioctl)
(fp, hpuxtobsdioctl(com), dt, p);
(fp, hpuxtobsdioctl(com), dt, l);
if (error == 0 && com == HPUXTIOCLGET) {
*(int *)dt &= LTOSTOP;
if (*(int *)dt & LTOSTOP)
@ -844,7 +844,7 @@ hpux_sys_ioctl(l, v, retval)
break;
default:
error = (*fp->f_ops->fo_ioctl)(fp, com, dt, p);
error = (*fp->f_ops->fo_ioctl)(fp, com, dt, l);
break;
}
/*
@ -1073,11 +1073,11 @@ hpux_sys_getaccess(l, v, retval)
*/
vp = nd.ni_vp;
*retval = 0;
if (VOP_ACCESS(vp, VREAD, cred, p) == 0)
if (VOP_ACCESS(vp, VREAD, cred, l) == 0)
*retval |= R_OK;
if (vn_writechk(vp) == 0 && VOP_ACCESS(vp, VWRITE, cred, p) == 0)
if (vn_writechk(vp) == 0 && VOP_ACCESS(vp, VWRITE, cred, l) == 0)
*retval |= W_OK;
if (VOP_ACCESS(vp, VEXEC, cred, p) == 0)
if (VOP_ACCESS(vp, VEXEC, cred, l) == 0)
*retval |= X_OK;
vput(vp);
crfree(cred);
@ -1339,7 +1339,6 @@ hpux_sys_utime_6x(l, v, retval)
syscallarg(char *) fname;
syscallarg(time_t *) tptr;
} */ *uap = v;
struct proc *p = l->l_proc;
struct vnode *vp;
struct vattr vattr;
time_t tv[2];
@ -1366,7 +1365,7 @@ hpux_sys_utime_6x(l, v, retval)
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else
error = VOP_SETATTR(vp, &vattr, nd.ni_cnd.cn_cred, p);
error = VOP_SETATTR(vp, &vattr, nd.ni_cnd.cn_cred, l);
vput(vp);
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_net.c,v 1.27 2003/01/21 03:16:06 jdolecek Exp $ */
/* $NetBSD: hpux_net.c,v 1.28 2003/06/29 15:54:32 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hpux_net.c,v 1.27 2003/01/21 03:16:06 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: hpux_net.c,v 1.28 2003/06/29 15:54:32 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ktrace.h"
@ -168,14 +168,14 @@ hpux_sys_netioctl(l, v, retval)
(error = copyin((caddr_t)args, (caddr_t)uap, (u_int)i))) {
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p, code + MINBSDIPCCODE,
ktrsyscall(l, code + MINBSDIPCCODE,
code + MINBSDIPCCODE, NULL, (register_t *)uap);
#endif
return (error);
}
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p, code + MINBSDIPCCODE,
ktrsyscall(l, code + MINBSDIPCCODE,
code + MINBSDIPCCODE, NULL, (register_t *)uap);
#endif
return ((*hpuxtobsdipc[code].rout)(l, uap, retval));
@ -252,7 +252,7 @@ hpux_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);
}
@ -289,7 +289,7 @@ hpux_sys_setsockopt2(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);
}
@ -338,6 +338,6 @@ hpux_sys_getsockopt(l, v, retval)
if (m != NULL)
(void) m_free(m);
out:
FILE_UNUSE(fp, p);
FILE_UNUSE(fp, l);
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_tty.c,v 1.22 2003/03/27 15:54:02 he Exp $ */
/* $NetBSD: hpux_tty.c,v 1.23 2003/06/29 15:54:33 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hpux_tty.c,v 1.22 2003/03/27 15:54:02 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: hpux_tty.c,v 1.23 2003/06/29 15:54:33 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_43.h"
@ -88,7 +88,7 @@ hpux_termio(fd, com, data, l)
int line, error;
int newi = 0;
int (*ioctlrout) __P((struct file *fp, u_long com,
void *data, struct proc *p));
void *data, struct lwp *l));
fp = p->p_fd->fd_ofiles[fd];
@ -101,7 +101,7 @@ hpux_termio(fd, com, data, l)
/*
* Get BSD terminal state
*/
if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, p)))
if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, l)))
break;
memset((char *)&htios, 0, sizeof htios);
/*
@ -176,7 +176,7 @@ hpux_termio(fd, com, data, l)
*/
if (!newi) {
line = 0;
(void) (*ioctlrout)(fp, TIOCGETD, (caddr_t)&line, p);
(void) (*ioctlrout)(fp, TIOCGETD, (caddr_t)&line, l);
htios.c_reserved = line;
}
/*
@ -229,7 +229,7 @@ hpux_termio(fd, com, data, l)
/*
* Get old characteristics and determine if we are a tty.
*/
if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, p)))
if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, l)))
break;
if (newi)
memcpy((char *)&htios, data, sizeof htios);
@ -334,7 +334,7 @@ hpux_termio(fd, com, data, l)
com = TIOCSETAW;
else
com = TIOCSETAF;
error = (*ioctlrout)(fp, com, (caddr_t)&tios, p);
error = (*ioctlrout)(fp, com, (caddr_t)&tios, l);
if (error == 0) {
/*
* Set line discipline
@ -342,7 +342,7 @@ hpux_termio(fd, com, data, l)
if (!newi) {
line = htios.c_reserved;
(void) (*ioctlrout)(fp, TIOCSETD,
(caddr_t)&line, p);
(caddr_t)&line, l);
}
/*
* Set non-blocking IO if VMIN == VTIME == 0, clear
@ -544,13 +544,13 @@ getsettty(l, fdes, com, cmarg)
sb.sg_flags |= XTABS;
if (hsb.sg_flags & V7_HUPCL)
(void)(*fp->f_ops->fo_ioctl)
(fp, TIOCHPCL, (caddr_t)0, p);
(fp, TIOCHPCL, (caddr_t)0, l);
com = TIOCSETP;
} else {
memset((caddr_t)&hsb, 0, sizeof hsb);
com = TIOCGETP;
}
error = (*fp->f_ops->fo_ioctl)(fp, com, (caddr_t)&sb, p);
error = (*fp->f_ops->fo_ioctl)(fp, com, (caddr_t)&sb, l);
if (error == 0 && com == TIOCGETP) {
hsb.sg_ispeed = sb.sg_ispeed;
hsb.sg_ospeed = sb.sg_ospeed;