summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/spigot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa/spigot.c')
-rw-r--r--sys/i386/isa/spigot.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index db4a926..0bd87ff 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -161,7 +161,7 @@ spigot_attach(struct isa_device *devp)
}
static int
-spigot_open(dev_t dev, int flags, int fmt, struct proc *p)
+spigot_open(dev_t dev, int flags, int fmt, struct thread *td)
{
int error;
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -179,7 +179,7 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
* require sufficient privilege soon and nothing much can be done
* without them.
*/
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
@@ -194,7 +194,7 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
}
static int
-spigot_close(dev_t dev, int flags, int fmt, struct proc *p)
+spigot_close(dev_t dev, int flags, int fmt, struct thread *td)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -221,7 +221,7 @@ spigot_read(dev_t dev, struct uio *uio, int ioflag)
static int
-spigot_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+spigot_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int error;
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
@@ -230,21 +230,21 @@ struct spigot_info *info;
if(!data) return(EINVAL);
switch(cmd){
case SPIGOT_SETINT:
- ss->p = p;
+ ss->p = td->td_proc;
ss->signal_num = *((int *)data);
break;
case SPIGOT_IOPL_ON: /* allow access to the IO PAGE */
#if !defined(SPIGOT_UNSECURE)
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
return EPERM;
#endif
- p->p_frame->tf_eflags |= PSL_IOPL;
+ td->td_frame->tf_eflags |= PSL_IOPL;
break;
case SPIGOT_IOPL_OFF: /* deny access to the IO PAGE */
- p->p_frame->tf_eflags &= ~PSL_IOPL;
+ td->td_frame->tf_eflags &= ~PSL_IOPL;
break;
case SPIGOT_GET_INFO:
info = (struct spigot_info *)data;
OpenPOWER on IntegriCloud