diff options
author | phk <phk@FreeBSD.org> | 2004-06-17 17:16:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-17 17:16:53 +0000 |
commit | 40dd98a3bd2049465e7644b361b60da41a46efa0 (patch) | |
tree | fe8b297144afd6d6f7db41275c72cb5eb663ec02 /sys/dev/snp | |
parent | 9acfe1e733142ca875624a3acbf96c4ff27b36a4 (diff) | |
download | FreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.zip FreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.tar.gz |
Second half of the dev_t cleanup.
The big lines are:
NODEV -> NULL
NOUDEV -> NODEV
udev_t -> dev_t
udev2dev() -> findcdev()
Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
Diffstat (limited to 'sys/dev/snp')
-rw-r--r-- | sys/dev/snp/snp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 752dc42..6544810 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -406,7 +406,7 @@ snpopen(dev, flag, mode, td) * snp_tty == NULL is for inactive snoop devices. */ snp->snp_tty = NULL; - snp->snp_target = NODEV; + snp->snp_target = NULL; LIST_INSERT_HEAD(&snp_sclist, snp, snp_list); return (0); @@ -439,7 +439,7 @@ snp_detach(snp) printf("snp%d: bad attached tty data\n", snp->snp_unit); snp->snp_tty = NULL; - snp->snp_target = NODEV; + snp->snp_target = NULL; detach_notty: selwakeuppri(&snp->snp_sel, PZERO + 1); @@ -500,8 +500,8 @@ snpioctl(dev, cmd, data, flags, td) snp = dev->si_drv1; switch (cmd) { case SNPSTTY: - tdev = udev2dev(*((udev_t *)data)); - if (tdev == NODEV) + tdev = findcdev(*((dev_t *)data)); + if (tdev == NULL) return (snp_down(snp)); tp = snpdevtotty(tdev); @@ -512,7 +512,7 @@ snpioctl(dev, cmd, data, flags, td) s = spltty(); - if (snp->snp_target == NODEV) { + if (snp->snp_target == NULL) { tpo = snp->snp_tty; if (tpo) tpo->t_state &= ~TS_SNOOP; @@ -540,7 +540,7 @@ snpioctl(dev, cmd, data, flags, td) * SNPGTTY happy, else we can't know what is device * major/minor for tty. */ - *((udev_t *)data) = dev2udev(snp->snp_target); + *((dev_t *)data) = dev2udev(snp->snp_target); break; case FIONBIO: @@ -609,7 +609,7 @@ snp_clone(arg, name, namelen, dev) { int u, i; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name, NULL, "snp", &u) != 1) return; |