summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/schistory.c2
-rw-r--r--sys/dev/syscons/scmouse.c6
-rw-r--r--sys/dev/syscons/scterm-sc.c2
-rw-r--r--sys/dev/syscons/scvesactl.c4
-rw-r--r--sys/dev/syscons/scvidctl.c2
-rw-r--r--sys/dev/syscons/syscons.c34
-rw-r--r--sys/dev/syscons/syscons.h10
-rw-r--r--sys/dev/syscons/sysmouse.c10
8 files changed, 35 insertions, 35 deletions
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index bd9b1d2..3df7682 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -278,7 +278,7 @@ sc_hist_down_line(scr_stat *scp)
int
sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
- struct proc *p)
+ struct thread *td)
{
scr_stat *scp;
int error;
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index b8bb5d1..92ced7d 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -600,7 +600,7 @@ sc_mouse_paste(scr_stat *scp)
int
sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
- struct proc *p)
+ struct thread *td)
{
mouse_info_t *mouse;
mouse_info_t buf;
@@ -658,8 +658,8 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
case MOUSE_MODE:
if (ISSIGVALID(mouse->u.mode.signal)) {
scp->mouse_signal = mouse->u.mode.signal;
- scp->mouse_proc = p;
- scp->mouse_pid = p->p_pid;
+ scp->mouse_proc = td->td_proc;
+ scp->mouse_pid = td->td_proc->p_pid;
}
else {
scp->mouse_signal = 0;
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index fb02b92..1b9b979 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -711,7 +711,7 @@ outloop:
static int
scterm_ioctl(scr_stat *scp, struct tty *tp, u_long cmd, caddr_t data,
- int flag, struct proc *p)
+ int flag, struct thread *td)
{
term_stat *tcp = scp->ts;
vid_info_t *vi;
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index a9ff4ad..7a92d33f 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -46,7 +46,7 @@
static d_ioctl_t *prev_user_ioctl;
static int
-vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
scr_stat *scp;
struct tty *tp;
@@ -106,7 +106,7 @@ vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
}
if (prev_user_ioctl)
- return (*prev_user_ioctl)(dev, cmd, data, flag, p);
+ return (*prev_user_ioctl)(dev, cmd, data, flag, td);
else
return ENOIOCTL;
}
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index b75e545..b28752b 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -435,7 +435,7 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
(*vidsw[(a)->va_index]->ioctl)((a), (c), (caddr_t)(d)))
int
-sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
+sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct thread *td)
{
scr_stat *scp;
video_adapter_t *adp;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index fe5176f..644864e 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -442,7 +442,7 @@ scdevtounit(dev_t dev)
}
int
-scopen(dev_t dev, int flag, int mode, struct proc *p)
+scopen(dev_t dev, int flag, int mode, struct thread *td)
{
int unit = scdevtounit(dev);
sc_softc_t *sc;
@@ -481,7 +481,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
(*linesw[tp->t_line].l_modem)(tp, 1);
}
else
- if (tp->t_state & TS_XCLUDE && suser(p))
+ if (tp->t_state & TS_XCLUDE && suser_td(td))
return(EBUSY);
error = (*linesw[tp->t_line].l_open)(dev, tp);
@@ -501,7 +501,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
}
int
-scclose(dev_t dev, int flag, int mode, struct proc *p)
+scclose(dev_t dev, int flag, int mode, struct thread *td)
{
struct tty *tp = dev->si_tty;
scr_stat *scp;
@@ -634,7 +634,7 @@ scparam(struct tty *tp, struct termios *t)
}
int
-scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int error;
int i;
@@ -647,23 +647,23 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
/* If there is a user_ioctl function call that first */
if (sc_user_ioctl) {
- error = (*sc_user_ioctl)(dev, cmd, data, flag, p);
+ error = (*sc_user_ioctl)(dev, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
}
- error = sc_vid_ioctl(tp, cmd, data, flag, p);
+ error = sc_vid_ioctl(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
#ifndef SC_NO_HISTORY
- error = sc_hist_ioctl(tp, cmd, data, flag, p);
+ error = sc_hist_ioctl(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
#endif
#ifndef SC_NO_SYSMOUSE
- error = sc_mouse_ioctl(tp, cmd, data, flag, p);
+ error = sc_mouse_ioctl(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
#endif
@@ -674,7 +674,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
sc = scp->sc;
if (scp->tsw) {
- error = (*scp->tsw->te_ioctl)(scp, tp, cmd, data, flag, p);
+ error = (*scp->tsw->te_ioctl)(scp, tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
}
@@ -855,7 +855,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
DPRINTF(5, ("sc%d: VT_SETMODE ", sc->unit));
if (scp->smode.mode == VT_PROCESS) {
p1 = pfind(scp->pid);
- if (scp->proc == p1 && scp->proc != p) {
+ if (scp->proc == p1 && scp->proc != td->td_proc) {
if (p1)
PROC_UNLOCK(p1);
DPRINTF(5, ("error EPERM\n"));
@@ -884,9 +884,9 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
DPRINTF(5, ("error EINVAL\n"));
return EINVAL;
}
- DPRINTF(5, ("VT_PROCESS %d, ", p->p_pid));
+ DPRINTF(5, ("VT_PROCESS %d, ", td->td_proc->p_pid));
bcopy(data, &scp->smode, sizeof(struct vt_mode));
- scp->proc = p;
+ scp->proc = td->td_proc;
scp->pid = scp->proc->p_pid;
if ((scp == sc->cur_scp) && (sc->unit == sc_console_unit))
cons_unavail = TRUE;
@@ -911,7 +911,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
return EINVAL;
}
/* ...and this process is controlling it. */
- if (scp->proc != p) {
+ if (scp->proc != td->td_proc) {
splx(s);
return EPERM;
}
@@ -977,19 +977,19 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
return 0;
case KDENABIO: /* allow io operations */
- error = suser(p);
+ error = suser_td(td);
if (error != 0)
return error;
if (securelevel > 0)
return EPERM;
#ifdef __i386__
- p->p_frame->tf_eflags |= PSL_IOPL;
+ td->td_frame->tf_eflags |= PSL_IOPL;
#endif
return 0;
case KDDISABIO: /* disallow io operations (default) */
#ifdef __i386__
- p->p_frame->tf_eflags &= ~PSL_IOPL;
+ td->td_frame->tf_eflags &= ~PSL_IOPL;
#endif
return 0;
@@ -1270,7 +1270,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
}
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return(error);
error = ttioctl(tp, cmd, data, flag);
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 7a353f8..b5e206a 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -338,7 +338,7 @@ typedef int sc_term_init_t(scr_stat *scp, void **tcp, int code);
typedef int sc_term_term_t(scr_stat *scp, void **tcp);
typedef void sc_term_puts_t(scr_stat *scp, u_char *buf, int len);
typedef int sc_term_ioctl_t(scr_stat *scp, struct tty *tp, u_long cmd,
- caddr_t data, int flag, struct proc *p);
+ caddr_t data, int flag, struct thread *td);
typedef int sc_term_reset_t(scr_stat *scp, int code);
#define SC_TE_HARD_RESET 0
#define SC_TE_SOFT_RESET 1
@@ -508,7 +508,7 @@ typedef struct {
/* syscons.c */
extern int (*sc_user_ioctl)(dev_t dev, u_long cmd, caddr_t data,
- int flag, struct proc *p);
+ int flag, struct thread *td);
int sc_probe_unit(int unit, int flags);
int sc_attach_unit(int unit, int flags);
@@ -550,7 +550,7 @@ void sc_hist_end(scr_stat *scp);
int sc_hist_up_line(scr_stat *scp);
int sc_hist_down_line(scr_stat *scp);
int sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data,
- int flag, struct proc *p);
+ int flag, struct thread *td);
#endif /* SC_NO_HISTORY */
/* scmouse.c */
@@ -575,7 +575,7 @@ void sc_mouse_paste(scr_stat *scp);
#ifndef SC_NO_SYSMOUSE
void sc_mouse_move(scr_stat *scp, int x, int y);
int sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data,
- int flag, struct proc *p);
+ int flag, struct thread *td);
#endif /* SC_NO_SYSMOUSE */
/* scvidctl.c */
@@ -585,7 +585,7 @@ int sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode);
int sc_set_pixel_mode(scr_stat *scp, struct tty *tp,
int xsize, int ysize, int fontsize);
int sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
- struct proc *p);
+ struct thread *td);
int sc_render_add(sc_renderer_t *rndr);
int sc_render_remove(sc_renderer_t *rndr);
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index bb38cfe..80eac8e 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -72,7 +72,7 @@ static void smstart(struct tty *tp);
static int smparam(struct tty *tp, struct termios *t);
static int
-smopen(dev_t dev, int flag, int mode, struct proc *p)
+smopen(dev_t dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
@@ -99,7 +99,7 @@ smopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
smparam(tp, &tp->t_termios);
(*linesw[tp->t_line].l_modem)(tp, 1);
- } else if (tp->t_state & TS_XCLUDE && suser(p)) {
+ } else if (tp->t_state & TS_XCLUDE && suser_td(td)) {
return EBUSY;
}
@@ -107,7 +107,7 @@ smopen(dev_t dev, int flag, int mode, struct proc *p)
}
static int
-smclose(dev_t dev, int flag, int mode, struct proc *p)
+smclose(dev_t dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
int s;
@@ -151,7 +151,7 @@ smparam(struct tty *tp, struct termios *t)
}
static int
-smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct tty *tp;
mousehw_t *hw;
@@ -239,7 +239,7 @@ smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
return ENODEV;
}
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td);
if (error != ENOIOCTL)
return error;
error = ttioctl(tp, cmd, data, flag);
OpenPOWER on IntegriCloud