[BACK]Return to epcom.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / arm / ep93xx

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/arm/ep93xx/epcom.c between version 1.7 and 1.7.2.4

version 1.7, 2006/02/20 16:50:36 version 1.7.2.4, 2006/08/11 15:41:10
Line 115  __KERNEL_RCSID(0, "$NetBSD$");
Line 115  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/tty.h>  #include <sys/tty.h>
 #include <sys/uio.h>  #include <sys/uio.h>
 #include <sys/vnode.h>  #include <sys/vnode.h>
   #include <sys/kauth.h>
   
 #include <machine/intr.h>  #include <machine/intr.h>
 #include <machine/bus.h>  #include <machine/bus.h>
Line 190  struct consdev epcomcons = {
Line 191  struct consdev epcomcons = {
 #define COM_ISALIVE(sc) ((sc)->enabled != 0 && \  #define COM_ISALIVE(sc) ((sc)->enabled != 0 && \
                         device_is_active(&(sc)->sc_dev))                          device_is_active(&(sc)->sc_dev))
   
 #define SET(t, f)       (t) |= (f)  
 #define CLR(t, f)       (t) &= ~(f)  
 #define ISSET(t, f)     ((t) & (f))  
   
 void  void
 epcom_attach_subr(struct epcom_softc *sc)  epcom_attach_subr(struct epcom_softc *sc)
 {  {
Line 240  epcom_attach_subr(struct epcom_softc *sc
Line 237  epcom_attach_subr(struct epcom_softc *sc
                 /* locate the major number */                  /* locate the major number */
                 maj = cdevsw_lookup_major(&epcom_cdevsw);                  maj = cdevsw_lookup_major(&epcom_cdevsw);
   
                 cn_tab->cn_dev = makedev(maj, sc->sc_dev.dv_unit);                  cn_tab->cn_dev = makedev(maj, device_unit(&sc->sc_dev));
   
                 aprint_normal("%s: console\n", sc->sc_dev.dv_xname);                  aprint_normal("%s: console\n", sc->sc_dev.dv_xname);
         }          }
Line 474  epcomopen(dev_t dev, int flag, int mode,
Line 471  epcomopen(dev_t dev, int flag, int mode,
   
         if (ISSET(tp->t_state, TS_ISOPEN) &&          if (ISSET(tp->t_state, TS_ISOPEN) &&
             ISSET(tp->t_state, TS_XCLUDE) &&              ISSET(tp->t_state, TS_XCLUDE) &&
             suser(l->l_proc->p_ucred, &l->l_proc->p_acflag) != 0)              kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
               &l->l_acflag) != 0)
                 return (EBUSY);                  return (EBUSY);
   
         s = spltty();          s = spltty();
Line 696  epcomioctl(dev_t dev, u_long cmd, caddr_
Line 694  epcomioctl(dev_t dev, u_long cmd, caddr_
                 break;                  break;
   
         case TIOCSFLAGS:          case TIOCSFLAGS:
                 error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag);                  error = kauth_authorize_generic(l->l_cred,
                       KAUTH_GENERIC_ISSUSER, &l->l_acflag);
                 if (error)                  if (error)
                         break;                          break;
                 sc->sc_swflags = *(int *)data;                  sc->sc_swflags = *(int *)data;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.4

CVSweb <webmaster@jp.NetBSD.org>