diff options
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_compat.h | 2 | ||||
-rw-r--r-- | sys/contrib/pf/net/pf_ioctl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index daf824c..6f05720 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -1709,7 +1709,7 @@ MALLOC_DECLARE(M_IPFILTER); # endif # ifndef GET_MINOR -# define GET_MINOR(x) minor(x) +# define GET_MINOR(x) dev2unit(x) # endif # define PANIC(x,y) if (x) panic y #endif /* _KERNEL */ diff --git a/sys/contrib/pf/net/pf_ioctl.c b/sys/contrib/pf/net/pf_ioctl.c index 3e99a99..9b35443 100644 --- a/sys/contrib/pf/net/pf_ioctl.c +++ b/sys/contrib/pf/net/pf_ioctl.c @@ -478,7 +478,7 @@ pf_thread_create(void *v) int pfopen(struct cdev *dev, int flags, int fmt, struct proc *p) { - if (minor(dev) >= 1) + if (dev2unit(dev) >= 1) return (ENXIO); return (0); } @@ -486,7 +486,7 @@ pfopen(struct cdev *dev, int flags, int fmt, struct proc *p) int pfclose(struct cdev *dev, int flags, int fmt, struct proc *p) { - if (minor(dev) >= 1) + if (dev2unit(dev) >= 1) return (ENXIO); return (0); } |