From 4e2d2aa1cd4f4f0351b1c984930edcdde311c296 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 30 Jan 1999 12:17:38 +0000 Subject: Use suser() to check for super user rather than examining cr_uid directly. Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles. --- sys/dev/cy/cy.c | 5 +++-- sys/dev/cy/cy_isa.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/cy') diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index e95d7e635479..42f679448278 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.83 1999/01/08 19:17:46 bde Exp $ + * $Id: cy.c,v 1.84 1999/01/28 01:59:53 dillon Exp $ */ #include "opt_compat.h" @@ -728,7 +728,8 @@ open_top: goto open_top; } } - if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) { + if (tp->t_state & TS_XCLUDE && + suser(p->p_ucred, &p->p_acflag)) { error = EBUSY; goto out; } diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index e95d7e635479..42f679448278 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.83 1999/01/08 19:17:46 bde Exp $ + * $Id: cy.c,v 1.84 1999/01/28 01:59:53 dillon Exp $ */ #include "opt_compat.h" @@ -728,7 +728,8 @@ open_top: goto open_top; } } - if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) { + if (tp->t_state & TS_XCLUDE && + suser(p->p_ucred, &p->p_acflag)) { error = EBUSY; goto out; } -- cgit v1.3