summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
committerphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
commit16e3fbd2c114d665755299002f1c50dd11ba7245 (patch)
treed7f6bebfe177ae90b67d27603da4d211433088e5 /sys/dev/rp
parentaba5e776bb95610ea3e3355cbf47aadb844773eb (diff)
downloadFreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.zip
FreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.tar.gz
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.
Diffstat (limited to 'sys/dev/rp')
-rw-r--r--sys/dev/rp/rp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 9a95809..39972dd 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: $
+ * $Id: rp.c,v 1.23 1999/04/24 20:26:12 billf Exp $
*/
/*
@@ -1341,7 +1341,7 @@ open_top:
}
}
if(tp->t_state & TS_XCLUDE &&
- suser(p->p_ucred, &p->p_acflag)) {
+ suser(p)) {
splx(oldspl);
return(EBUSY);
}
@@ -1614,7 +1614,7 @@ rpioctl(dev, cmd, data, flag, p)
}
switch (cmd) {
case TIOCSETA:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if(error != 0)
return(error);
*ct = *(struct termios *)data;
@@ -1759,7 +1759,7 @@ rpioctl(dev, cmd, data, flag, p)
*(int *)data = result;
break;
case TIOCMSDTRWAIT:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if(error != 0) {
splx(oldspl);
return(error);
OpenPOWER on IntegriCloud