More changes for providing lwpid for ktrace (sparc GENERIC built)
This commit is contained in:
parent
964da8bfb6
commit
28c230cff5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bpp.c,v 1.19 2002/12/10 13:44:47 pk Exp $ */
|
||||
/* $NetBSD: bpp.c,v 1.20 2003/06/29 09:56:29 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.19 2002/12/10 13:44:47 pk Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.20 2003/06/29 09:56:29 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -256,10 +256,10 @@ bpp_setparams(sc, hw)
|
|||
}
|
||||
|
||||
int
|
||||
bppopen(dev, flags, mode, p)
|
||||
bppopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = BPPUNIT(dev);
|
||||
struct bpp_softc *sc;
|
||||
|
@ -290,10 +290,10 @@ bppopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
bppclose(dev, flags, mode, p)
|
||||
bppclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct bpp_softc *sc = bpp_cd.cd_devs[BPPUNIT(dev)];
|
||||
struct lsi64854_softc *lsi = &sc->sc_lsi64854;
|
||||
|
@ -409,12 +409,12 @@ out:
|
|||
#define BPPIOCGPARAM _IOR('P', 0x2, struct hwstate)
|
||||
|
||||
int
|
||||
bppioctl(dev, cmd, data, flag, p)
|
||||
bppioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct bpp_softc *sc = bpp_cd.cd_devs[BPPUNIT(dev)];
|
||||
struct hwstate *hw, *chw;
|
||||
|
@ -464,7 +464,7 @@ bppioctl(dev, cmd, data, flag, p)
|
|||
if (sc->sc_asyncproc != NULL)
|
||||
error = EBUSY;
|
||||
else
|
||||
sc->sc_asyncproc = p;
|
||||
sc->sc_asyncproc = l->l_proc;
|
||||
} else
|
||||
sc->sc_asyncproc = NULL;
|
||||
splx(s);
|
||||
|
@ -477,10 +477,10 @@ bppioctl(dev, cmd, data, flag, p)
|
|||
}
|
||||
|
||||
int
|
||||
bpppoll(dev, events, p)
|
||||
bpppoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct bpp_softc *sc = bpp_cd.cd_devs[BPPUNIT(dev)];
|
||||
int revents = 0;
|
||||
|
@ -496,9 +496,9 @@ bpppoll(dev, events, p)
|
|||
|
||||
if (revents == 0) {
|
||||
if (events & (POLLIN | POLLRDNORM))
|
||||
selrecord(p, &sc->sc_rsel);
|
||||
selrecord(l, &sc->sc_rsel);
|
||||
if (events & (POLLOUT | POLLWRNORM))
|
||||
selrecord(p, &sc->sc_wsel);
|
||||
selrecord(l, &sc->sc_wsel);
|
||||
}
|
||||
|
||||
return (revents);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: magma.c,v 1.25 2003/02/22 05:11:16 tsutsui Exp $ */
|
||||
/* $NetBSD: magma.c,v 1.26 2003/06/29 09:56:29 darrenr Exp $ */
|
||||
/*
|
||||
* magma.c
|
||||
*
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.25 2003/02/22 05:11:16 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.26 2003/06/29 09:56:29 darrenr Exp $");
|
||||
|
||||
#if 0
|
||||
#define MAGMA_DEBUG
|
||||
|
@ -902,11 +902,11 @@ mtty_attach(parent, dev, args)
|
|||
* open routine. returns zero if successful, else error code
|
||||
*/
|
||||
int
|
||||
mttyopen(dev, flags, mode, p)
|
||||
mttyopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int card = MAGMA_CARD(dev);
|
||||
int port = MAGMA_PORT(dev);
|
||||
|
@ -926,7 +926,7 @@ mttyopen(dev, flags, mode, p)
|
|||
|
||||
if (ISSET(tp->t_state, TS_ISOPEN) &&
|
||||
ISSET(tp->t_state, TS_XCLUDE) &&
|
||||
p->p_ucred->cr_uid != 0)
|
||||
l->l_proc->p_ucred->cr_uid != 0)
|
||||
return (EBUSY);
|
||||
|
||||
s = spltty();
|
||||
|
@ -1001,11 +1001,11 @@ bad:
|
|||
* close routine. returns zero if successful, else error code
|
||||
*/
|
||||
int
|
||||
mttyclose(dev, flag, mode, p)
|
||||
mttyclose(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(dev)];
|
||||
struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(dev)];
|
||||
|
@ -1075,16 +1075,16 @@ mttywrite(dev, uio, flags)
|
|||
* Poll routine
|
||||
*/
|
||||
int
|
||||
mttypoll(dev, events, p)
|
||||
mttypoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(dev)];
|
||||
struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(dev)];
|
||||
struct tty *tp = mp->mp_tty;
|
||||
|
||||
return ((*tp->t_linesw->l_poll)(tp, events, p));
|
||||
return ((*tp->t_linesw->l_poll)(tp, events, l));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1104,22 +1104,23 @@ mttytty(dev)
|
|||
* ioctl routine
|
||||
*/
|
||||
int
|
||||
mttyioctl(dev, cmd, data, flags, p)
|
||||
mttyioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(dev)];
|
||||
struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(dev)];
|
||||
struct tty *tp = mp->mp_tty;
|
||||
int error;
|
||||
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flags, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flags, l);
|
||||
if( error != EPASSTHROUGH ) return(error);
|
||||
|
||||
error = ttioctl(tp, cmd, data, flags, p);
|
||||
error = ttioctl(tp, cmd, data, flags, l);
|
||||
if( error != EPASSTHROUGH ) return(error);
|
||||
|
||||
error = 0;
|
||||
|
@ -1164,7 +1165,7 @@ mttyioctl(dev, cmd, data, flags, p)
|
|||
break;
|
||||
|
||||
case TIOCSFLAGS:
|
||||
if( suser(p->p_ucred, &p->p_acflag) )
|
||||
if (suser(p->p_ucred, &p->p_acflag) )
|
||||
error = EPERM;
|
||||
else
|
||||
mp->mp_openflags = *((int *)data) &
|
||||
|
@ -1501,11 +1502,11 @@ mbpp_attach(parent, dev, args)
|
|||
* open routine. returns zero if successful, else error code
|
||||
*/
|
||||
int
|
||||
mbppopen(dev, flags, mode, p)
|
||||
mbppopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int card = MAGMA_CARD(dev);
|
||||
int port = MAGMA_PORT(dev);
|
||||
|
@ -1554,11 +1555,11 @@ mbppopen(dev, flags, mode, p)
|
|||
* close routine. returns zero if successful, else error code
|
||||
*/
|
||||
int
|
||||
mbppclose(dev, flag, mode, p)
|
||||
mbppclose(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mbpp_softc *ms = mbpp_cd.cd_devs[MAGMA_CARD(dev)];
|
||||
struct mbpp_port *mp = &ms->ms_port[MAGMA_PORT(dev)];
|
||||
|
@ -1571,12 +1572,12 @@ mbppclose(dev, flag, mode, p)
|
|||
* ioctl routine
|
||||
*/
|
||||
int
|
||||
mbppioctl(dev, cmd, data, flags, p)
|
||||
mbppioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mbpp_softc *ms = mbpp_cd.cd_devs[MAGMA_CARD(dev)];
|
||||
struct mbpp_port *mp = &ms->ms_port[MAGMA_PORT(dev)];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: p9100.c,v 1.14 2002/10/23 09:13:43 jdolecek Exp $ */
|
||||
/* $NetBSD: p9100.c,v 1.15 2003/06/29 09:56:29 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.14 2002/10/23 09:13:43 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.15 2003/06/29 09:56:29 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -332,7 +332,7 @@ p9100_shutdown(arg)
|
|||
}
|
||||
|
||||
int
|
||||
p9100open(dev_t dev, int flags, int mode, struct proc *p)
|
||||
p9100open(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -342,7 +342,7 @@ p9100open(dev_t dev, int flags, int mode, struct proc *p)
|
|||
}
|
||||
|
||||
int
|
||||
p9100ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
p9100ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l)
|
||||
{
|
||||
struct p9100_softc *sc = pnozz_cd.cd_devs[minor(dev)];
|
||||
struct fbgattr *fba;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcx.c,v 1.13 2002/10/23 09:13:43 jdolecek Exp $ */
|
||||
/* $NetBSD: tcx.c,v 1.14 2003/06/29 09:56:29 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996,1998 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.13 2002/10/23 09:13:43 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.14 2003/06/29 09:56:29 darrenr Exp $");
|
||||
|
||||
/*
|
||||
* define for cg8 emulation on S24 (24-bit version of tcx) for the SS5;
|
||||
|
@ -348,10 +348,10 @@ static int tcx_opens = 0;
|
|||
#endif
|
||||
|
||||
int
|
||||
tcxopen(dev, flags, mode, p)
|
||||
tcxopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
#ifdef TCX_CG8
|
||||
|
@ -386,10 +386,10 @@ tcxopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
tcxclose(dev, flags, mode, p)
|
||||
tcxclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct tcx_softc *sc = tcx_cd.cd_devs[minor(dev)];
|
||||
#ifdef TCX_CG8
|
||||
|
@ -424,12 +424,12 @@ tcxclose(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
tcxioctl(dev, cmd, data, flags, p)
|
||||
tcxioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct tcx_softc *sc = tcx_cd.cd_devs[minor(dev)];
|
||||
int error;
|
||||
|
@ -497,7 +497,7 @@ tcxioctl(dev, cmd, data, flags, p)
|
|||
default:
|
||||
#ifdef DEBUG
|
||||
log(LOG_NOTICE, "tcxioctl(0x%lx) (%s[%d])\n", cmd,
|
||||
p->p_comm, p->p_pid);
|
||||
l->l_proc->p_comm, l->l_proc->p_pid);
|
||||
#endif
|
||||
return (ENOTTY);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zx.c,v 1.6 2002/12/10 13:44:48 pk Exp $ */
|
||||
/* $NetBSD: zx.c,v 1.7 2003/06/29 09:56:29 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -52,7 +52,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.6 2002/12/10 13:44:48 pk Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.7 2003/06/29 09:56:29 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -277,7 +277,7 @@ zx_attach(struct device *parent, struct device *self, void *args)
|
|||
}
|
||||
|
||||
int
|
||||
zxopen(dev_t dev, int flags, int mode, struct proc *p)
|
||||
zxopen(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
{
|
||||
|
||||
if (device_lookup(&zx_cd, minor(dev)) == NULL)
|
||||
|
@ -286,7 +286,7 @@ zxopen(dev_t dev, int flags, int mode, struct proc *p)
|
|||
}
|
||||
|
||||
int
|
||||
zxclose(dev_t dev, int flags, int mode, struct proc *p)
|
||||
zxclose(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
{
|
||||
struct zx_softc *sc;
|
||||
|
||||
|
@ -298,7 +298,7 @@ zxclose(dev_t dev, int flags, int mode, struct proc *p)
|
|||
}
|
||||
|
||||
int
|
||||
zxioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
zxioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l)
|
||||
{
|
||||
struct zx_softc *sc;
|
||||
struct fbcmap *cm;
|
||||
|
@ -474,7 +474,7 @@ zxioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
|||
default:
|
||||
#ifdef DEBUG
|
||||
log(LOG_NOTICE, "zxioctl(0x%lx) (%s[%d])\n", cmd,
|
||||
p->p_comm, p->p_pid);
|
||||
l->l_proc->p_comm, l->l_proc->p_pid);
|
||||
#endif
|
||||
return (ENOTTY);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bwtwo.c,v 1.6 2002/10/23 09:13:53 jdolecek Exp $ */
|
||||
/* $NetBSD: bwtwo.c,v 1.7 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -90,7 +90,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.6 2002/10/23 09:13:53 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.7 2003/06/29 09:56:30 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -219,10 +219,10 @@ bwtwoattach(sc, name, isconsole)
|
|||
}
|
||||
|
||||
int
|
||||
bwtwoopen(dev, flags, mode, p)
|
||||
bwtwoopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -233,12 +233,12 @@ bwtwoopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
bwtwoioctl(dev, cmd, data, flags, p)
|
||||
bwtwoioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct bwtwo_softc *sc = bwtwo_cd.cd_devs[minor(dev)];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgsix.c,v 1.10 2003/01/18 10:38:38 thorpej Exp $ */
|
||||
/* $NetBSD: cgsix.c,v 1.11 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -89,7 +89,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.10 2003/01/18 10:38:38 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.11 2003/06/29 09:56:30 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -535,10 +535,10 @@ cg6attach(sc, name, isconsole)
|
|||
|
||||
|
||||
int
|
||||
cgsixopen(dev, flags, mode, p)
|
||||
cgsixopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -548,10 +548,10 @@ cgsixopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgsixclose(dev, flags, mode, p)
|
||||
cgsixclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgsix_softc *sc = cgsix_cd.cd_devs[minor(dev)];
|
||||
|
||||
|
@ -565,12 +565,12 @@ cgsixclose(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgsixioctl(dev, cmd, data, flags, p)
|
||||
cgsixioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgsix_softc *sc = cgsix_cd.cd_devs[minor(dev)];
|
||||
u_int count;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgthree.c,v 1.6 2002/10/23 09:13:54 jdolecek Exp $ */
|
||||
/* $NetBSD: cgthree.c,v 1.7 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.6 2002/10/23 09:13:54 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.7 2003/06/29 09:56:30 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -162,10 +162,10 @@ cgthreeattach(sc, name, isconsole)
|
|||
|
||||
|
||||
int
|
||||
cgthreeopen(dev, flags, mode, p)
|
||||
cgthreeopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -175,12 +175,12 @@ cgthreeopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgthreeioctl(dev, cmd, data, flags, p)
|
||||
cgthreeioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgthree_softc *sc = cgthree_cd.cd_devs[minor(dev)];
|
||||
struct fbgattr *fba;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: event.c,v 1.12 2002/11/26 18:49:48 christos Exp $ */
|
||||
/* $NetBSD: event.c,v 1.13 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.12 2002/11/26 18:49:48 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.13 2003/06/29 09:56:30 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/fcntl.h>
|
||||
|
@ -157,16 +157,16 @@ ev_read(ev, uio, flags)
|
|||
}
|
||||
|
||||
int
|
||||
ev_poll(ev, events, p)
|
||||
ev_poll(ev, events, l)
|
||||
struct evvar *ev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int s = splev(), revents = 0;
|
||||
|
||||
if (events & (POLLIN | POLLRDNORM)) {
|
||||
if (ev->ev_get == ev->ev_put)
|
||||
selrecord(p, &ev->ev_sel);
|
||||
selrecord(l, &ev->ev_sel);
|
||||
else
|
||||
revents |= events & (POLLIN | POLLRDNORM);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: event_var.h,v 1.4 2002/10/23 09:13:54 jdolecek Exp $ */
|
||||
/* $NetBSD: event_var.h,v 1.5 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -79,7 +79,7 @@ struct evvar {
|
|||
void ev_init __P((struct evvar *));
|
||||
void ev_fini __P((struct evvar *));
|
||||
int ev_read __P((struct evvar *, struct uio *, int));
|
||||
int ev_poll __P((struct evvar *, int, struct proc *));
|
||||
int ev_poll __P((struct evvar *, int, struct lwp *));
|
||||
int ev_kqfilter __P((struct evvar *, struct knote *));
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fb.c,v 1.10 2002/10/23 09:13:55 jdolecek Exp $ */
|
||||
/* $NetBSD: fb.c,v 1.11 2003/06/29 09:56:30 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -50,7 +50,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.10 2002/10/23 09:13:55 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.11 2003/06/29 09:56:30 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -210,47 +210,47 @@ fb_attach(fb, isconsole)
|
|||
}
|
||||
|
||||
int
|
||||
fbopen(dev, flags, mode, p)
|
||||
fbopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
if (devfb == NULL)
|
||||
return (ENXIO);
|
||||
return (devfb->fb_driver->fbd_open)(dev, flags, mode, p);
|
||||
return (devfb->fb_driver->fbd_open)(dev, flags, mode, l);
|
||||
}
|
||||
|
||||
int
|
||||
fbclose(dev, flags, mode, p)
|
||||
fbclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (devfb->fb_driver->fbd_close)(dev, flags, mode, p);
|
||||
return (devfb->fb_driver->fbd_close)(dev, flags, mode, l);
|
||||
}
|
||||
|
||||
int
|
||||
fbioctl(dev, cmd, data, flags, p)
|
||||
fbioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (devfb->fb_driver->fbd_ioctl)(dev, cmd, data, flags, p);
|
||||
return (devfb->fb_driver->fbd_ioctl)(dev, cmd, data, flags, l);
|
||||
}
|
||||
|
||||
int
|
||||
fbpoll(dev, events, p)
|
||||
fbpoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (devfb->fb_driver->fbd_poll)(dev, events, p);
|
||||
return (devfb->fb_driver->fbd_poll)(dev, events, l);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fbvar.h,v 1.4 2002/10/23 09:13:55 jdolecek Exp $ */
|
||||
/* $NetBSD: fbvar.h,v 1.5 2003/06/29 09:56:31 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -60,10 +60,10 @@
|
|||
struct fbdriver {
|
||||
/* device unblank function (force kernel output to display) */
|
||||
void (*fbd_unblank)(struct device *);
|
||||
int (*fbd_open)(dev_t, int, int, struct proc *);
|
||||
int (*fbd_close)(dev_t, int, int, struct proc *);
|
||||
int (*fbd_ioctl)(dev_t, u_long, caddr_t, int, struct proc *);
|
||||
int (*fbd_poll)(dev_t, int, struct proc *);
|
||||
int (*fbd_open)(dev_t, int, int, struct lwp *);
|
||||
int (*fbd_close)(dev_t, int, int, struct lwp *);
|
||||
int (*fbd_ioctl)(dev_t, u_long, caddr_t, int, struct lwp *);
|
||||
int (*fbd_poll)(dev_t, int, struct lwp *);
|
||||
paddr_t (*fbd_mmap)(dev_t, off_t, int);
|
||||
int (*fbd_kqfilter)(dev_t, struct knote *);
|
||||
#ifdef notyet
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kbd.c,v 1.35 2002/10/26 19:11:13 martin Exp $ */
|
||||
/* $NetBSD: kbd.c,v 1.36 2003/06/29 09:56:31 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -51,7 +51,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.35 2002/10/26 19:11:13 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.36 2003/06/29 09:56:31 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -97,7 +97,7 @@ const struct cdevsw kbd_cdevsw = {
|
|||
#if NWSKBD > 0
|
||||
int wssunkbd_enable __P((void *, int));
|
||||
void wssunkbd_set_leds __P((void *, int));
|
||||
int wssunkbd_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
|
||||
int wssunkbd_ioctl __P((void *, u_long, caddr_t, int, struct lwp *));
|
||||
|
||||
void sunkbd_wskbd_cngetc __P((void *, u_int *, int *));
|
||||
void sunkbd_wskbd_cnpollc __P((void *, int));
|
||||
|
@ -170,10 +170,10 @@ static void kbd_input_event(struct kbd_softc *, int);
|
|||
* setup event channel, clear ASCII repeat stuff.
|
||||
*/
|
||||
int
|
||||
kbdopen(dev, flags, mode, p)
|
||||
kbdopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kbd_softc *k;
|
||||
int error, unit;
|
||||
|
@ -196,7 +196,7 @@ kbdopen(dev, flags, mode, p)
|
|||
/* exclusive open required for /dev/kbd */
|
||||
if (k->k_events.ev_io)
|
||||
return (EBUSY);
|
||||
k->k_events.ev_io = p;
|
||||
k->k_events.ev_io = l->l_proc;
|
||||
|
||||
/* stop pending autorepeat of console input */
|
||||
if (k->k_repeating) {
|
||||
|
@ -224,10 +224,10 @@ kbdopen(dev, flags, mode, p)
|
|||
* unless it is supplying console input.
|
||||
*/
|
||||
int
|
||||
kbdclose(dev, flags, mode, p)
|
||||
kbdclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kbd_softc *k;
|
||||
|
||||
|
@ -259,15 +259,15 @@ kbdread(dev, uio, flags)
|
|||
|
||||
|
||||
int
|
||||
kbdpoll(dev, events, p)
|
||||
kbdpoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kbd_softc *k;
|
||||
|
||||
k = kbd_cd.cd_devs[minor(dev)];
|
||||
return (ev_poll(&k->k_events, events, p));
|
||||
return (ev_poll(&k->k_events, events, l));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -282,12 +282,12 @@ kbdkqfilter(dev, kn)
|
|||
}
|
||||
|
||||
int
|
||||
kbdioctl(dev, cmd, data, flag, p)
|
||||
kbdioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kbd_softc *k;
|
||||
struct kbd_state *ks;
|
||||
|
@ -995,12 +995,12 @@ wssunkbd_set_leds(v, leds)
|
|||
}
|
||||
|
||||
int
|
||||
wssunkbd_ioctl(v, cmd, data, flag, p)
|
||||
wssunkbd_ioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
return EPASSTHROUGH;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ms.c,v 1.24 2003/05/30 23:34:06 petrov Exp $ */
|
||||
/* $NetBSD: ms.c,v 1.25 2003/06/29 09:56:31 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -56,7 +56,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.24 2003/05/30 23:34:06 petrov Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.25 2003/06/29 09:56:31 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -105,10 +105,10 @@ const struct cdevsw ms_cdevsw = {
|
|||
****************************************************************/
|
||||
|
||||
int
|
||||
msopen(dev, flags, mode, p)
|
||||
msopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ms_softc *ms;
|
||||
int unit;
|
||||
|
@ -130,7 +130,7 @@ msopen(dev, flags, mode, p)
|
|||
if (err)
|
||||
return (err);
|
||||
}
|
||||
ms->ms_events.ev_io = p;
|
||||
ms->ms_events.ev_io = l->l_proc;
|
||||
ev_init(&ms->ms_events); /* may cause sleep */
|
||||
|
||||
ms->ms_ready = 1; /* start accepting events */
|
||||
|
@ -138,10 +138,10 @@ msopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
msclose(dev, flags, mode, p)
|
||||
msclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ms_softc *ms;
|
||||
|
||||
|
@ -172,12 +172,12 @@ msread(dev, uio, flags)
|
|||
}
|
||||
|
||||
int
|
||||
msioctl(dev, cmd, data, flag, p)
|
||||
msioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ms_softc *ms;
|
||||
|
||||
|
@ -211,15 +211,15 @@ msioctl(dev, cmd, data, flag, p)
|
|||
}
|
||||
|
||||
int
|
||||
mspoll(dev, events, p)
|
||||
mspoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ms_softc *ms;
|
||||
|
||||
ms = ms_cd.cd_devs[minor(dev)];
|
||||
return (ev_poll(&ms->ms_events, events, p));
|
||||
return (ev_poll(&ms->ms_events, events, l));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xd.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $ */
|
||||
/* $NetBSD: xd.c,v 1.50 2003/06/29 09:56:31 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -51,7 +51,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.50 2003/06/29 09:56:31 darrenr Exp $");
|
||||
|
||||
#undef XDC_DEBUG /* full debug */
|
||||
#define XDC_DIAG /* extra sanity checks */
|
||||
|
@ -935,10 +935,10 @@ done:
|
|||
* xdclose: close device
|
||||
*/
|
||||
int
|
||||
xdclose(dev, flag, fmt, p)
|
||||
xdclose(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct xd_softc *xd = xd_cd.cd_devs[DISKUNIT(dev)];
|
||||
int part = DISKPART(dev);
|
||||
|
@ -1001,14 +1001,15 @@ xddump(dev, blkno, va, size)
|
|||
* xdioctl: ioctls on XD drives. based on ioctl's of other netbsd disks.
|
||||
*/
|
||||
int
|
||||
xdioctl(dev, command, addr, flag, p)
|
||||
xdioctl(dev, command, addr, flag, l)
|
||||
dev_t dev;
|
||||
u_long command;
|
||||
caddr_t addr;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct xd_softc *xd;
|
||||
struct xd_iocmd *xio;
|
||||
int error, s, unit;
|
||||
|
@ -1128,10 +1129,10 @@ xdioctl(dev, command, addr, flag, p)
|
|||
*/
|
||||
|
||||
int
|
||||
xdopen(dev, flag, fmt, p)
|
||||
xdopen(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit, part;
|
||||
struct xd_softc *xd;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xy.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $ */
|
||||
/* $NetBSD: xy.c,v 1.50 2003/06/29 09:56:32 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -51,7 +51,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.50 2003/06/29 09:56:32 darrenr Exp $");
|
||||
|
||||
#undef XYC_DEBUG /* full debug */
|
||||
#undef XYC_DIAG /* extra sanity checks */
|
||||
|
@ -846,10 +846,10 @@ done:
|
|||
* xyclose: close device
|
||||
*/
|
||||
int
|
||||
xyclose(dev, flag, fmt, p)
|
||||
xyclose(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
|
||||
{
|
||||
struct xy_softc *xy = xy_cd.cd_devs[DISKUNIT(dev)];
|
||||
|
@ -913,14 +913,15 @@ xydump(dev, blkno, va, size)
|
|||
* xyioctl: ioctls on XY drives. based on ioctl's of other netbsd disks.
|
||||
*/
|
||||
int
|
||||
xyioctl(dev, command, addr, flag, p)
|
||||
xyioctl(dev, command, addr, flag, l)
|
||||
dev_t dev;
|
||||
u_long command;
|
||||
caddr_t addr;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct xy_softc *xy;
|
||||
struct xd_iocmd *xio;
|
||||
int error, s, unit;
|
||||
|
@ -1040,10 +1041,10 @@ xyioctl(dev, command, addr, flag, p)
|
|||
*/
|
||||
|
||||
int
|
||||
xyopen(dev, flag, fmt, p)
|
||||
xyopen(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit, part;
|
||||
struct xy_softc *xy;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: advfsops.c,v 1.5 2003/06/28 14:21:48 darrenr Exp $ */
|
||||
/* $NetBSD: advfsops.c,v 1.6 2003/06/29 09:56:32 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.5 2003/06/28 14:21:48 darrenr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.6 2003/06/29 09:56:32 darrenr Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -182,11 +182,12 @@ adosfs_mount(mp, path, data, ndp, l)
|
|||
}
|
||||
|
||||
int
|
||||
adosfs_mountfs(devvp, mp, p)
|
||||
adosfs_mountfs(devvp, mp, l)
|
||||
struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct disklabel dl;
|
||||
struct partition *parp;
|
||||
struct adosfsmount *amp;
|
||||
|
@ -207,7 +208,7 @@ adosfs_mountfs(devvp, mp, p)
|
|||
return (error);
|
||||
if (vcount(devvp) > 1 && devvp != rootvp)
|
||||
return (EBUSY);
|
||||
if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)) != 0)
|
||||
if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, l, 0, 0)) != 0)
|
||||
return (error);
|
||||
|
||||
/*
|
||||
|
@ -215,7 +216,7 @@ adosfs_mountfs(devvp, mp, p)
|
|||
*/
|
||||
if ((error = VOP_OPEN(devvp, FREAD, NOCRED, p)) != 0)
|
||||
return (error);
|
||||
error = VOP_IOCTL(devvp, DIOCGDINFO, &dl, FREAD, NOCRED, p);
|
||||
error = VOP_IOCTL(devvp, DIOCGDINFO, &dl, FREAD, NOCRED, l);
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
|
@ -276,7 +277,7 @@ adosfs_mountfs(devvp, mp, p)
|
|||
/*
|
||||
* get the root anode, if not a valid fs this will fail.
|
||||
*/
|
||||
if ((error = VFS_ROOT(mp, &rvp)) != 0)
|
||||
if ((error = VFS_ROOT(mp, &rvp, l)) != 0)
|
||||
goto fail;
|
||||
/* allocate and load bitmap, set free space */
|
||||
amp->bitmap = malloc(((amp->numblks + 31) / 32) * sizeof(*amp->bitmap),
|
||||
|
@ -306,20 +307,20 @@ fail:
|
|||
}
|
||||
|
||||
int
|
||||
adosfs_start(mp, flags, p)
|
||||
adosfs_start(mp, flags, l)
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
adosfs_unmount(mp, mntflags, p)
|
||||
adosfs_unmount(mp, mntflags, l)
|
||||
struct mount *mp;
|
||||
int mntflags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct adosfsmount *amp;
|
||||
int error, flags;
|
||||
|
@ -333,7 +334,7 @@ adosfs_unmount(mp, mntflags, p)
|
|||
if (amp->devvp->v_type != VBAD)
|
||||
amp->devvp->v_specmountpoint = NULL;
|
||||
vn_lock(amp->devvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
error = VOP_CLOSE(amp->devvp, FREAD, NOCRED, p);
|
||||
error = VOP_CLOSE(amp->devvp, FREAD, NOCRED, l);
|
||||
vput(amp->devvp);
|
||||
if (amp->bitmap)
|
||||
free(amp->bitmap, M_ADOSFSBITMAP);
|
||||
|
@ -359,10 +360,10 @@ adosfs_root(mp, vpp)
|
|||
}
|
||||
|
||||
int
|
||||
adosfs_statfs(mp, sbp, p)
|
||||
adosfs_statfs(mp, sbp, l)
|
||||
struct mount *mp;
|
||||
struct statfs *sbp;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct adosfsmount *amp;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: union.h,v 1.3 2003/03/17 10:31:14 jdolecek Exp $ */
|
||||
/* $NetBSD: union.h,v 1.4 2003/06/29 09:56:32 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 The Regents of the University of California.
|
||||
|
@ -103,26 +103,26 @@ extern int union_allocvp __P((struct vnode **, struct mount *,
|
|||
struct componentname *, struct vnode *,
|
||||
struct vnode *, int));
|
||||
extern int union_copyfile __P((struct vnode *, struct vnode *,
|
||||
struct ucred *, struct proc *));
|
||||
struct ucred *, struct lwp *));
|
||||
extern int union_copyup __P((struct union_node *, int, struct ucred *,
|
||||
struct proc *));
|
||||
struct lwp *));
|
||||
extern void union_diruncache __P((struct union_node *));
|
||||
extern int union_dowhiteout __P((struct union_node *, struct ucred *,
|
||||
struct proc *));
|
||||
struct lwp *));
|
||||
extern int union_mkshadow __P((struct union_mount *, struct vnode *,
|
||||
struct componentname *, struct vnode **));
|
||||
extern int union_mkwhiteout __P((struct union_mount *, struct vnode *,
|
||||
struct componentname *, char *));
|
||||
extern int union_vn_create __P((struct vnode **, struct union_node *,
|
||||
struct proc *));
|
||||
struct lwp *));
|
||||
extern int union_cn_close __P((struct vnode *, int, struct ucred *,
|
||||
struct proc *));
|
||||
struct lwp *));
|
||||
extern void union_removed_upper __P((struct union_node *un));
|
||||
extern struct vnode *union_lowervp __P((struct vnode *));
|
||||
extern void union_newlower __P((struct union_node *, struct vnode *));
|
||||
extern void union_newupper __P((struct union_node *, struct vnode *));
|
||||
extern void union_newsize __P((struct vnode *, off_t, off_t));
|
||||
int union_readdirhook(struct vnode **, struct file *, struct proc *);
|
||||
int union_readdirhook(struct vnode **, struct file *, struct lwp *);
|
||||
|
||||
#define MOUNTTOUNIONMOUNT(mp) ((struct union_mount *)((mp)->mnt_data))
|
||||
#define VTOUNION(vp) ((struct union_node *)(vp)->v_data)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: union_subr.c,v 1.2 2003/03/17 09:11:30 jdolecek Exp $ */
|
||||
/* $NetBSD: union_subr.c,v 1.3 2003/06/29 09:56:33 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Jan-Simon Pendry
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.2 2003/03/17 09:11:30 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.3 2003/06/29 09:56:33 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -80,9 +80,9 @@ void union_updatevp __P((struct union_node *, struct vnode *, struct vnode *));
|
|||
static int union_relookup __P((struct union_mount *, struct vnode *,
|
||||
struct vnode **, struct componentname *,
|
||||
struct componentname *, const char *, int));
|
||||
int union_vn_close __P((struct vnode *, int, struct ucred *, struct proc *));
|
||||
int union_vn_close __P((struct vnode *, int, struct ucred *, struct lwp *));
|
||||
static void union_dircache_r __P((struct vnode *, struct vnode ***, int *));
|
||||
struct vnode *union_dircache __P((struct vnode *, struct proc *));
|
||||
struct vnode *union_dircache __P((struct vnode *, struct lwp *));
|
||||
|
||||
void
|
||||
union_init()
|
||||
|
@ -369,7 +369,7 @@ loop:
|
|||
(un->un_uppervp == uppervp ||
|
||||
un->un_uppervp == NULLVP) &&
|
||||
(UNIONTOV(un)->v_mount == mp)) {
|
||||
if (vget(UNIONTOV(un), 0)) {
|
||||
if (vget(UNIONTOV(un), 0, cnp->cn_lwp)) {
|
||||
union_list_unlock(hash);
|
||||
goto loop;
|
||||
}
|
||||
|
@ -586,11 +586,11 @@ union_freevp(vp)
|
|||
* and (tvp) are locked on entry and exit.
|
||||
*/
|
||||
int
|
||||
union_copyfile(fvp, tvp, cred, p)
|
||||
union_copyfile(fvp, tvp, cred, l)
|
||||
struct vnode *fvp;
|
||||
struct vnode *tvp;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
char *buf;
|
||||
struct uio uio;
|
||||
|
@ -605,15 +605,15 @@ union_copyfile(fvp, tvp, cred, p)
|
|||
* give up at the first sign of trouble.
|
||||
*/
|
||||
|
||||
uio.uio_procp = p;
|
||||
uio.uio_lwp = l;
|
||||
uio.uio_segflg = UIO_SYSSPACE;
|
||||
uio.uio_offset = 0;
|
||||
|
||||
VOP_UNLOCK(fvp, 0); /* XXX */
|
||||
VOP_LEASE(fvp, p, cred, LEASE_READ);
|
||||
VOP_LEASE(fvp, l, cred, LEASE_READ);
|
||||
vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
|
||||
VOP_UNLOCK(tvp, 0); /* XXX */
|
||||
VOP_LEASE(tvp, p, cred, LEASE_WRITE);
|
||||
VOP_LEASE(tvp, l, cred, LEASE_WRITE);
|
||||
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
|
||||
|
||||
buf = malloc(MAXBSIZE, M_TEMP, M_WAITOK);
|
||||
|
@ -658,17 +658,17 @@ union_copyfile(fvp, tvp, cred, p)
|
|||
* locked on exit.
|
||||
*/
|
||||
int
|
||||
union_copyup(un, docopy, cred, p)
|
||||
union_copyup(un, docopy, cred, l)
|
||||
struct union_node *un;
|
||||
int docopy;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int error;
|
||||
struct vnode *lvp, *uvp;
|
||||
struct vattr lvattr, uvattr;
|
||||
|
||||
error = union_vn_create(&uvp, un, p);
|
||||
error = union_vn_create(&uvp, un, l);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
|
@ -685,19 +685,19 @@ union_copyup(un, docopy, cred, p)
|
|||
*/
|
||||
vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
|
||||
error = VOP_GETATTR(lvp, &lvattr, cred, p);
|
||||
error = VOP_GETATTR(lvp, &lvattr, cred, l);
|
||||
if (error == 0)
|
||||
error = VOP_OPEN(lvp, FREAD, cred, p);
|
||||
error = VOP_OPEN(lvp, FREAD, cred, l);
|
||||
if (error == 0) {
|
||||
error = union_copyfile(lvp, uvp, cred, p);
|
||||
(void) VOP_CLOSE(lvp, FREAD, cred, p);
|
||||
error = union_copyfile(lvp, uvp, cred, l);
|
||||
(void) VOP_CLOSE(lvp, FREAD, cred, l);
|
||||
}
|
||||
if (error == 0) {
|
||||
/* Copy permissions up too */
|
||||
VATTR_NULL(&uvattr);
|
||||
uvattr.va_mode = lvattr.va_mode;
|
||||
uvattr.va_flags = lvattr.va_flags;
|
||||
error = VOP_SETATTR(uvp, &uvattr, cred, p);
|
||||
error = VOP_SETATTR(uvp, &uvattr, cred, l);
|
||||
}
|
||||
VOP_UNLOCK(lvp, 0);
|
||||
#ifdef UNION_DIAGNOSTIC
|
||||
|
@ -706,7 +706,7 @@ union_copyup(un, docopy, cred, p)
|
|||
#endif
|
||||
|
||||
}
|
||||
union_vn_close(uvp, FWRITE, cred, p);
|
||||
union_vn_close(uvp, FWRITE, cred, l);
|
||||
|
||||
/*
|
||||
* Subsequent IOs will go to the top layer, so
|
||||
|
@ -721,8 +721,8 @@ union_copyup(un, docopy, cred, p)
|
|||
|
||||
vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
for (i = 0; i < un->un_openl; i++) {
|
||||
(void) VOP_CLOSE(lvp, FREAD, cred, p);
|
||||
(void) VOP_OPEN(uvp, FREAD, cred, p);
|
||||
(void) VOP_CLOSE(lvp, FREAD, cred, l);
|
||||
(void) VOP_OPEN(uvp, FREAD, cred, l);
|
||||
}
|
||||
un->un_openl = 0;
|
||||
VOP_UNLOCK(lvp, 0);
|
||||
|
@ -764,7 +764,7 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
|
|||
|
||||
cn->cn_nameiop = CREATE;
|
||||
cn->cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN);
|
||||
cn->cn_proc = cnp->cn_proc;
|
||||
cn->cn_lwp = cnp->cn_lwp;
|
||||
if (um->um_op == UNMNT_ABOVE)
|
||||
cn->cn_cred = cnp->cn_cred;
|
||||
else
|
||||
|
@ -809,7 +809,7 @@ union_mkshadow(um, dvp, cnp, vpp)
|
|||
{
|
||||
int error;
|
||||
struct vattr va;
|
||||
struct proc *p = cnp->cn_proc;
|
||||
struct lwp *l = cnp->cn_lwp;
|
||||
struct componentname cn;
|
||||
|
||||
error = union_relookup(um, dvp, vpp, cnp, &cn,
|
||||
|
@ -838,7 +838,7 @@ union_mkshadow(um, dvp, cnp, vpp)
|
|||
va.va_mode = um->um_cmode;
|
||||
|
||||
/* VOP_LEASE: dvp is locked */
|
||||
VOP_LEASE(dvp, p, cn.cn_cred, LEASE_WRITE);
|
||||
VOP_LEASE(dvp, l, cn.cn_cred, LEASE_WRITE);
|
||||
|
||||
error = VOP_MKDIR(dvp, vpp, &cn, &va);
|
||||
return (error);
|
||||
|
@ -861,7 +861,7 @@ union_mkwhiteout(um, dvp, cnp, path)
|
|||
char *path;
|
||||
{
|
||||
int error;
|
||||
struct proc *p = cnp->cn_proc;
|
||||
struct lwp *l = cnp->cn_lwp;
|
||||
struct vnode *wvp;
|
||||
struct componentname cn;
|
||||
|
||||
|
@ -880,7 +880,7 @@ union_mkwhiteout(um, dvp, cnp, path)
|
|||
}
|
||||
|
||||
/* VOP_LEASE: dvp is locked */
|
||||
VOP_LEASE(dvp, p, p->p_ucred, LEASE_WRITE);
|
||||
VOP_LEASE(dvp, l, l->l_proc->p_ucred, LEASE_WRITE);
|
||||
|
||||
error = VOP_WHITEOUT(dvp, &cn, CREATE);
|
||||
if (error)
|
||||
|
@ -900,11 +900,12 @@ union_mkwhiteout(um, dvp, cnp, path)
|
|||
* whereas relookup is told where to start.
|
||||
*/
|
||||
int
|
||||
union_vn_create(vpp, un, p)
|
||||
union_vn_create(vpp, un, l)
|
||||
struct vnode **vpp;
|
||||
struct union_node *un;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct vnode *vp;
|
||||
struct ucred *cred = p->p_ucred;
|
||||
struct vattr vat;
|
||||
|
@ -932,8 +933,8 @@ union_vn_create(vpp, un, p)
|
|||
memcpy(cn.cn_pnbuf, un->un_path, cn.cn_namelen+1);
|
||||
cn.cn_nameiop = CREATE;
|
||||
cn.cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN);
|
||||
cn.cn_proc = p;
|
||||
cn.cn_cred = p->p_ucred;
|
||||
cn.cn_lwp = l;
|
||||
cn.cn_cred = l->l_proc->p_ucred;
|
||||
cn.cn_nameptr = cn.cn_pnbuf;
|
||||
cn.cn_hash = un->un_hash;
|
||||
cn.cn_consume = 0;
|
||||
|
@ -966,11 +967,11 @@ union_vn_create(vpp, un, p)
|
|||
VATTR_NULL(vap);
|
||||
vap->va_type = VREG;
|
||||
vap->va_mode = cmode;
|
||||
VOP_LEASE(un->un_dirvp, p, cred, LEASE_WRITE);
|
||||
VOP_LEASE(un->un_dirvp, l, cred, LEASE_WRITE);
|
||||
if ((error = VOP_CREATE(un->un_dirvp, &vp, &cn, vap)) != 0)
|
||||
return (error);
|
||||
|
||||
if ((error = VOP_OPEN(vp, fmode, cred, p)) != 0) {
|
||||
if ((error = VOP_OPEN(vp, fmode, cred, l)) != 0) {
|
||||
vput(vp);
|
||||
return (error);
|
||||
}
|
||||
|
@ -981,16 +982,16 @@ union_vn_create(vpp, un, p)
|
|||
}
|
||||
|
||||
int
|
||||
union_vn_close(vp, fmode, cred, p)
|
||||
union_vn_close(vp, fmode, cred, l)
|
||||
struct vnode *vp;
|
||||
int fmode;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
if (fmode & FWRITE)
|
||||
--vp->v_writecount;
|
||||
return (VOP_CLOSE(vp, fmode, cred, p));
|
||||
return (VOP_CLOSE(vp, fmode, cred, l));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1045,17 +1046,17 @@ union_lowervp(vp)
|
|||
* during a remove/rmdir operation.
|
||||
*/
|
||||
int
|
||||
union_dowhiteout(un, cred, p)
|
||||
union_dowhiteout(un, cred, l)
|
||||
struct union_node *un;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct vattr va;
|
||||
|
||||
if (un->un_lowervp != NULLVP)
|
||||
return (1);
|
||||
|
||||
if (VOP_GETATTR(un->un_uppervp, &va, cred, p) == 0 &&
|
||||
if (VOP_GETATTR(un->un_uppervp, &va, cred, l) == 0 &&
|
||||
(va.va_flags & OPAQUE))
|
||||
return (1);
|
||||
|
||||
|
@ -1091,9 +1092,9 @@ union_dircache_r(vp, vppp, cntp)
|
|||
}
|
||||
|
||||
struct vnode *
|
||||
union_dircache(vp, p)
|
||||
union_dircache(vp, l)
|
||||
struct vnode *vp;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int cnt;
|
||||
struct vnode *nvp = NULLVP;
|
||||
|
@ -1161,7 +1162,7 @@ union_diruncache(un)
|
|||
* entry after the upper directory is read.
|
||||
*/
|
||||
int
|
||||
union_readdirhook(struct vnode **vpp, struct file *fp, struct proc *p)
|
||||
union_readdirhook(struct vnode **vpp, struct file *fp, struct lwp *l)
|
||||
{
|
||||
struct vnode *vp = *vpp, *lvp;
|
||||
struct vattr va;
|
||||
|
@ -1170,20 +1171,20 @@ union_readdirhook(struct vnode **vpp, struct file *fp, struct proc *p)
|
|||
if (vp->v_op != union_vnodeop_p)
|
||||
return (0);
|
||||
|
||||
if ((lvp = union_dircache(vp, p)) == NULLVP)
|
||||
if ((lvp = union_dircache(vp, l)) == NULLVP)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* If the directory is opaque,
|
||||
* then don't show lower entries
|
||||
*/
|
||||
error = VOP_GETATTR(vp, &va, fp->f_cred, p);
|
||||
error = VOP_GETATTR(vp, &va, fp->f_cred, l);
|
||||
if (error || (va.va_flags & OPAQUE)) {
|
||||
vput(lvp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
error = VOP_OPEN(lvp, FREAD, fp->f_cred, p);
|
||||
error = VOP_OPEN(lvp, FREAD, fp->f_cred, l);
|
||||
if (error) {
|
||||
vput(lvp);
|
||||
return (error);
|
||||
|
@ -1191,7 +1192,7 @@ union_readdirhook(struct vnode **vpp, struct file *fp, struct proc *p)
|
|||
VOP_UNLOCK(lvp, 0);
|
||||
fp->f_data = (caddr_t) lvp;
|
||||
fp->f_offset = 0;
|
||||
error = vn_close(vp, FREAD, fp->f_cred, p);
|
||||
error = vn_close(vp, FREAD, fp->f_cred, l);
|
||||
if (error)
|
||||
return (error);
|
||||
*vpp = lvp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: union_vfsops.c,v 1.4 2003/04/16 21:44:20 christos Exp $ */
|
||||
/* $NetBSD: union_vfsops.c,v 1.5 2003/06/29 09:56:33 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 The Regents of the University of California.
|
||||
|
@ -44,7 +44,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.4 2003/04/16 21:44:20 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.5 2003/06/29 09:56:33 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -61,32 +61,34 @@ __KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.4 2003/04/16 21:44:20 christos Ex
|
|||
#include <fs/union/union.h>
|
||||
|
||||
int union_mount __P((struct mount *, const char *, void *, struct nameidata *,
|
||||
struct proc *));
|
||||
int union_start __P((struct mount *, int, struct proc *));
|
||||
int union_unmount __P((struct mount *, int, struct proc *));
|
||||
int union_root __P((struct mount *, struct vnode **));
|
||||
int union_quotactl __P((struct mount *, int, uid_t, caddr_t, struct proc *));
|
||||
int union_statfs __P((struct mount *, struct statfs *, struct proc *));
|
||||
int union_sync __P((struct mount *, int, struct ucred *, struct proc *));
|
||||
int union_vget __P((struct mount *, ino_t, struct vnode **));
|
||||
int union_fhtovp __P((struct mount *, struct fid *, struct vnode **));
|
||||
struct lwp *));
|
||||
int union_start __P((struct mount *, int, struct lwp *));
|
||||
int union_unmount __P((struct mount *, int, struct lwp *));
|
||||
int union_root __P((struct mount *, struct vnode **, struct lwp *));
|
||||
int union_quotactl __P((struct mount *, int, uid_t, caddr_t, struct lwp *));
|
||||
int union_statfs __P((struct mount *, struct statfs *, struct lwp *));
|
||||
int union_sync __P((struct mount *, int, struct ucred *, struct lwp *));
|
||||
int union_vget __P((struct mount *, ino_t, struct vnode **, struct lwp *));
|
||||
int union_fhtovp __P((struct mount *, struct fid *, struct vnode **, \
|
||||
struct lwp *));
|
||||
int union_checkexp __P((struct mount *, struct mbuf *, int *,
|
||||
struct ucred **));
|
||||
int union_vptofh __P((struct vnode *, struct fid *));
|
||||
int union_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
|
||||
struct proc *));
|
||||
struct lwp *));
|
||||
|
||||
/*
|
||||
* Mount union filesystem
|
||||
*/
|
||||
int
|
||||
union_mount(mp, path, data, ndp, p)
|
||||
union_mount(mp, path, data, ndp, l)
|
||||
struct mount *mp;
|
||||
const char *path;
|
||||
void *data;
|
||||
struct nameidata *ndp;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
int error = 0;
|
||||
struct union_args args;
|
||||
struct vnode *lowerrootvp = NULLVP;
|
||||
|
@ -136,7 +138,7 @@ union_mount(mp, path, data, ndp, p)
|
|||
* Find upper node.
|
||||
*/
|
||||
NDINIT(ndp, LOOKUP, FOLLOW,
|
||||
UIO_USERSPACE, args.target, p);
|
||||
UIO_USERSPACE, args.target, l);
|
||||
|
||||
if ((error = namei(ndp)) != 0)
|
||||
goto bad;
|
||||
|
@ -227,7 +229,7 @@ union_mount(mp, path, data, ndp, p)
|
|||
vfs_getnewfsid(mp);
|
||||
|
||||
error = set_statfs_info( path, UIO_USERSPACE, NULL, UIO_USERSPACE,
|
||||
mp, p);
|
||||
mp, l);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
|
@ -287,10 +289,10 @@ bad:
|
|||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
union_start(mp, flags, p)
|
||||
union_start(mp, flags, l)
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (0);
|
||||
|
@ -300,10 +302,10 @@ union_start(mp, flags, p)
|
|||
* Free reference to union layer
|
||||
*/
|
||||
int
|
||||
union_unmount(mp, mntflags, p)
|
||||
union_unmount(mp, mntflags, l)
|
||||
struct mount *mp;
|
||||
int mntflags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
|
||||
struct vnode *um_rootvp;
|
||||
|
@ -314,7 +316,7 @@ union_unmount(mp, mntflags, p)
|
|||
printf("union_unmount(mp = %p)\n", mp);
|
||||
#endif
|
||||
|
||||
if ((error = union_root(mp, &um_rootvp)) != 0)
|
||||
if ((error = union_root(mp, &um_rootvp, l)) != 0)
|
||||
return (error);
|
||||
|
||||
/*
|
||||
|
@ -385,9 +387,10 @@ union_unmount(mp, mntflags, p)
|
|||
}
|
||||
|
||||
int
|
||||
union_root(mp, vpp)
|
||||
union_root(mp, vpp, l)
|
||||
struct mount *mp;
|
||||
struct vnode **vpp;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
|
||||
int error;
|
||||
|
@ -430,22 +433,22 @@ union_root(mp, vpp)
|
|||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
union_quotactl(mp, cmd, uid, arg, p)
|
||||
union_quotactl(mp, cmd, uid, arg, l)
|
||||
struct mount *mp;
|
||||
int cmd;
|
||||
uid_t uid;
|
||||
caddr_t arg;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
||||
int
|
||||
union_statfs(mp, sbp, p)
|
||||
union_statfs(mp, sbp, l)
|
||||
struct mount *mp;
|
||||
struct statfs *sbp;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int error;
|
||||
struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
|
||||
|
@ -460,7 +463,7 @@ union_statfs(mp, sbp, p)
|
|||
memset(&mstat, 0, sizeof(mstat));
|
||||
|
||||
if (um->um_lowervp) {
|
||||
error = VFS_STATFS(um->um_lowervp->v_mount, &mstat, p);
|
||||
error = VFS_STATFS(um->um_lowervp->v_mount, &mstat, l);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
@ -470,7 +473,7 @@ union_statfs(mp, sbp, p)
|
|||
sbp->f_blocks = mstat.f_blocks - mstat.f_bfree;
|
||||
sbp->f_files = mstat.f_files - mstat.f_ffree;
|
||||
|
||||
error = VFS_STATFS(um->um_uppervp->v_mount, &mstat, p);
|
||||
error = VFS_STATFS(um->um_uppervp->v_mount, &mstat, l);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
|
@ -500,11 +503,11 @@ union_statfs(mp, sbp, p)
|
|||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
union_sync(mp, waitfor, cred, p)
|
||||
union_sync(mp, waitfor, cred, l)
|
||||
struct mount *mp;
|
||||
int waitfor;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -515,10 +518,11 @@ union_sync(mp, waitfor, cred, p)
|
|||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
union_vget(mp, ino, vpp)
|
||||
union_vget(mp, ino, vpp, l)
|
||||
struct mount *mp;
|
||||
ino_t ino;
|
||||
struct vnode **vpp;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
|
@ -526,10 +530,11 @@ union_vget(mp, ino, vpp)
|
|||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
union_fhtovp(mp, fidp, vpp)
|
||||
union_fhtovp(mp, fidp, vpp, l)
|
||||
struct mount *mp;
|
||||
struct fid *fidp;
|
||||
struct vnode **vpp;
|
||||
struct lwp *l;
|
||||
{
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
|
@ -558,14 +563,14 @@ union_vptofh(vp, fhp)
|
|||
}
|
||||
|
||||
int
|
||||
union_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
union_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;
|
||||
{
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: union_vnops.c,v 1.2 2003/03/17 11:39:16 jdolecek Exp $ */
|
||||
/* $NetBSD: union_vnops.c,v 1.3 2003/06/29 09:56:33 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993, 1994, 1995 Jan-Simon Pendry.
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.2 2003/03/17 11:39:16 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.3 2003/06/29 09:56:33 darrenr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -239,7 +239,7 @@ union_lookup1(udvp, dvpp, vpp, cnp)
|
|||
if (vfs_busy(mp, 0, 0))
|
||||
continue;
|
||||
|
||||
error = VFS_ROOT(mp, &tdvp);
|
||||
error = VFS_ROOT(mp, &tdvp, curlwp);
|
||||
vfs_unbusy(mp);
|
||||
if (error) {
|
||||
vput(dvp);
|
||||
|
@ -359,7 +359,7 @@ union_lookup(v)
|
|||
iswhiteout = 1;
|
||||
} else if (lowerdvp != NULLVP) {
|
||||
lerror = VOP_GETATTR(upperdvp, &va,
|
||||
cnp->cn_cred, cnp->cn_proc);
|
||||
cnp->cn_cred, cnp->cn_lwp);
|
||||
if (lerror == 0 && (va.va_flags & OPAQUE))
|
||||
iswhiteout = 1;
|
||||
}
|
||||
|
@ -636,13 +636,13 @@ union_open(v)
|
|||
struct vnode *a_vp;
|
||||
int a_mode;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_n;
|
||||
} */ *ap = v;
|
||||
struct union_node *un = VTOUNION(ap->a_vp);
|
||||
struct vnode *tvp;
|
||||
int mode = ap->a_mode;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
struct proc *p = ap->a_p;
|
||||
struct lwp *p = ap->a_l;
|
||||
int error;
|
||||
|
||||
/*
|
||||
|
@ -698,7 +698,7 @@ union_close(v)
|
|||
struct vnode *a_vp;
|
||||
int a_fflag;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct union_node *un = VTOUNION(ap->a_vp);
|
||||
struct vnode *vp;
|
||||
|
@ -741,7 +741,7 @@ union_access(v)
|
|||
struct vnode *a_vp;
|
||||
int a_mode;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct union_node *un = VTOUNION(vp);
|
||||
|
@ -809,7 +809,7 @@ union_getattr(v)
|
|||
struct vnode *a_vp;
|
||||
struct vattr *a_vap;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
int error;
|
||||
struct union_node *un = VTOUNION(ap->a_vp);
|
||||
|
@ -847,7 +847,7 @@ union_getattr(v)
|
|||
if (un->un_flags & UN_LOCKED)
|
||||
FIXUP(un);
|
||||
|
||||
error = VOP_GETATTR(vp, vap, ap->a_cred, ap->a_p);
|
||||
error = VOP_GETATTR(vp, vap, ap->a_cred, ap->a_l);
|
||||
if (error)
|
||||
return (error);
|
||||
union_newsize(ap->a_vp, vap->va_size, VNOVAL);
|
||||
|
@ -864,7 +864,7 @@ union_getattr(v)
|
|||
}
|
||||
|
||||
if (vp != NULLVP) {
|
||||
error = VOP_GETATTR(vp, vap, ap->a_cred, ap->a_p);
|
||||
error = VOP_GETATTR(vp, vap, ap->a_cred, ap->a_l);
|
||||
if (error)
|
||||
return (error);
|
||||
union_newsize(ap->a_vp, VNOVAL, vap->va_size);
|
||||
|
@ -898,7 +898,7 @@ union_setattr(v)
|
|||
struct vnode *a_vp;
|
||||
struct vattr *a_vap;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vattr *vap = ap->a_vap;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
@ -940,7 +940,7 @@ union_setattr(v)
|
|||
/* assert(un->un_lowervp != NULLVP) */
|
||||
(un->un_lowervp->v_type == VREG)) {
|
||||
error = union_copyup(un, (vap->va_size != 0),
|
||||
ap->a_cred, ap->a_p);
|
||||
ap->a_cred, ap->a_l);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ union_setattr(v)
|
|||
if (un->un_uppervp != NULLVP) {
|
||||
FIXUP(un);
|
||||
error = VOP_SETATTR(un->un_uppervp, vap,
|
||||
ap->a_cred, ap->a_p);
|
||||
ap->a_cred, ap->a_l);
|
||||
if ((error == 0) && (vap->va_size != VNOVAL))
|
||||
union_newsize(ap->a_vp, vap->va_size, VNOVAL);
|
||||
} else {
|
||||
|
@ -1047,7 +1047,7 @@ union_lease(v)
|
|||
{
|
||||
struct vop_lease_args /* {
|
||||
struct vnode *a_vp;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
struct ucred *a_cred;
|
||||
int a_flag;
|
||||
} */ *ap = v;
|
||||
|
@ -1067,7 +1067,7 @@ union_ioctl(v)
|
|||
caddr_t a_data;
|
||||
int a_fflag;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *ovp = OTHERVP(ap->a_vp);
|
||||
|
||||
|
@ -1082,7 +1082,7 @@ union_poll(v)
|
|||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *ovp = OTHERVP(ap->a_vp);
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ union_revoke(v)
|
|||
struct vop_revoke_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ union_mmap(v)
|
|||
struct vnode *a_vp;
|
||||
int a_fflags;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
struct lwe *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *ovp = OTHERVP(ap->a_vp);
|
||||
|
||||
|
@ -1135,10 +1135,9 @@ union_fsync(v)
|
|||
int a_flags;
|
||||
off_t offhi;
|
||||
off_t offlo;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
int error = 0;
|
||||
struct proc *p;
|
||||
struct vnode *targetvp;
|
||||
|
||||
/*
|
||||
|
@ -1152,8 +1151,7 @@ union_fsync(v)
|
|||
return 0;
|
||||
|
||||
targetvp = OTHERVP(ap->a_vp);
|
||||
p = ap->a_p;
|
||||
|
||||
|
||||
if (targetvp != NULLVP) {
|
||||
int dolock = (targetvp == LOWERVP(ap->a_vp));
|
||||
|
||||
|
@ -1162,7 +1160,7 @@ union_fsync(v)
|
|||
else
|
||||
FIXUP(VTOUNION(ap->a_vp));
|
||||
error = VOP_FSYNC(targetvp, ap->a_cred, ap->a_flags,
|
||||
ap->a_offlo, ap->a_offhi, p);
|
||||
ap->a_offlo, ap->a_offhi, ap->a_l);
|
||||
if (dolock)
|
||||
VOP_UNLOCK(targetvp, 0);
|
||||
}
|
||||
|
@ -1216,7 +1214,7 @@ union_remove(v)
|
|||
un->un_flags |= UN_KLOCK;
|
||||
vput(ap->a_vp);
|
||||
|
||||
if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
|
||||
if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_lwp))
|
||||
cnp->cn_flags |= DOWHITEOUT;
|
||||
error = VOP_REMOVE(dvp, vp, cnp);
|
||||
if (!error)
|
||||
|
@ -1244,7 +1242,7 @@ union_link(v)
|
|||
} */ *ap = v;
|
||||
int error = 0;
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
struct proc *p = cnp->cn_proc;
|
||||
struct lwp *p = cnp->cn_lwp;
|
||||
struct union_node *dun;
|
||||
struct vnode *vp;
|
||||
struct vnode *dvp;
|
||||
|
@ -1497,7 +1495,7 @@ union_rmdir(v)
|
|||
un->un_flags |= UN_KLOCK;
|
||||
vput(ap->a_vp);
|
||||
|
||||
if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc))
|
||||
if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_lwp))
|
||||
cnp->cn_flags |= DOWHITEOUT;
|
||||
error = VOP_RMDIR(dvp, vp, ap->a_cnp);
|
||||
if (!error)
|
||||
|
@ -1635,7 +1633,7 @@ union_inactive(v)
|
|||
{
|
||||
struct vop_inactive_args /* {
|
||||
struct vnode *a_vp;
|
||||
struct proc *a_p;
|
||||
struct lwp *a_l;
|
||||
} */ *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct union_node *un = VTOUNION(vp);
|
||||
|
|
Loading…
Reference in New Issue