aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/isa/stallion.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
commitf711d546d27edc6115841ef780df0252d44a996d (patch)
treed19d0988b873086bf6eda1c6543fc9257015af3d /sys/i386/isa/stallion.c
parentd5483ddfbae9694934b27c4e7f23a4f0d3e0f5f4 (diff)
downloadsrc-f711d546d27edc6115841ef780df0252d44a996d.tar.gz
src-f711d546d27edc6115841ef780df0252d44a996d.zip
Suser() simplification:
1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
Notes
Notes: svn path=/head/; revision=46112
Diffstat (limited to 'sys/i386/isa/stallion.c')
-rw-r--r--sys/i386/isa/stallion.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index e90a82975b95..9bb4890af87c 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stallion.c,v 1.25 1999/01/30 12:17:34 phk Exp $
+ * $Id: stallion.c,v 1.26 1999/04/24 20:17:04 peter Exp $
*/
/*****************************************************************************/
@@ -830,7 +830,7 @@ stlopen_restart:
}
}
if ((tp->t_state & TS_XCLUDE) &&
- suser(p->p_ucred, &p->p_acflag)) {
+ suser(p)) {
error = EBUSY;
goto stlopen_end;
}
@@ -1013,7 +1013,7 @@ STATIC int stlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag,
switch (cmd) {
case TIOCSETA:
- if ((error = suser(p->p_ucred, &p->p_acflag)) == 0)
+ if ((error = suser(p)) == 0)
*localtios = *((struct termios *) data);
break;
case TIOCGETA:
@@ -1131,7 +1131,7 @@ STATIC int stlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag,
*((int *) data) = (stl_getsignals(portp) | TIOCM_LE);
break;
case TIOCMSDTRWAIT:
- if ((error = suser(p->p_ucred, &p->p_acflag)) == 0)
+ if ((error = suser(p)) == 0)
portp->dtrwait = *((int *) data) * hz / 100;
break;
case TIOCMGDTRWAIT: