diff options
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_stats.c | 8 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_socket.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_socket.h | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stream.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_types.h | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 999af87..6ff5910 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1083,13 +1083,13 @@ freebsd32_sendfile(struct thread *td, struct freebsd32_sendfile_args *uap) } struct stat32 { - udev_t st_dev; + dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; - udev_t st_rdev; + dev_t st_rdev; struct timespec32 st_atimespec; struct timespec32 st_mtimespec; struct timespec32 st_ctimespec; diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 4a02042..a9545fd 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -76,7 +76,7 @@ newstat_copyout(struct stat *buf, void *ubuf) * in FreeBSD but block devices under Linux. */ if (S_ISCHR(tbuf.st_mode) && - (dev = udev2dev(buf->st_rdev)) != NODEV) { + (dev = findcdev(buf->st_rdev)) != NULL) { cdevsw = devsw(dev); if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) { tbuf.st_mode &= ~S_IFMT; @@ -365,8 +365,8 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) * struct cdev *returned from previous syscalls. Just return a bzeroed * ustat in that case. */ - dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF)); - if (dev != NODEV && vfinddev(dev, &vp)) { + dev = findcdev(makedev(args->dev >> 8, args->dev & 0xFF)); + if (dev != NULL && vfinddev(dev, &vp)) { if (vp->v_mount == NULL) return (EINVAL); #ifdef MAC @@ -414,7 +414,7 @@ stat64_copyout(struct stat *buf, void *ubuf) * in FreeBSD but block devices under Linux. */ if (S_ISCHR(lbuf.st_mode) && - (dev = udev2dev(buf->st_rdev)) != NODEV) { + (dev = findcdev(buf->st_rdev)) != NULL) { cdevsw = devsw(dev); if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) { lbuf.st_mode &= ~S_IFMT; diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index 95014e0..65126d7 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -67,7 +67,7 @@ struct sockaddr_un * svr4_find_socket(td, fp, dev, ino) struct thread *td; struct file *fp; - udev_t dev; + dev_t dev; ino_t ino; { struct svr4_sockcache_entry *e; diff --git a/sys/compat/svr4/svr4_socket.h b/sys/compat/svr4/svr4_socket.h index b4b38f9..1df1e43 100644 --- a/sys/compat/svr4/svr4_socket.h +++ b/sys/compat/svr4/svr4_socket.h @@ -49,7 +49,7 @@ struct svr4_sockaddr_in { }; struct sockaddr_un *svr4_find_socket(struct thread *, struct file *, - udev_t, ino_t); + dev_t, ino_t); void svr4_delete_socket(struct proc *, struct file *); int svr4_add_socket(struct thread *, const char *, struct stat *); @@ -57,7 +57,7 @@ struct svr4_sockcache_entry { struct proc *p; /* Process for the socket */ void *cookie; /* Internal cookie used for matching */ struct sockaddr_un sock;/* Pathname for the socket */ - udev_t dev; /* Device where the socket lives on */ + dev_t dev; /* Device where the socket lives on */ ino_t ino; /* Inode where the socket lives on */ TAILQ_ENTRY(svr4_sockcache_entry) entries; }; diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index db7eabc..853a272 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -1873,7 +1873,7 @@ svr4_do_putmsg(td, uap, fp) } else { /* Maybe we've been given a device/inode pair */ - udev_t *dev = SVR4_ADDROF(&sc); + dev_t *dev = SVR4_ADDROF(&sc); ino_t *ino = (ino_t *) &dev[1]; skp = svr4_find_socket(td, fp, *dev, *ino); if (skp == NULL) { diff --git a/sys/compat/svr4/svr4_types.h b/sys/compat/svr4/svr4_types.h index 3421647..410746b 100644 --- a/sys/compat/svr4/svr4_types.h +++ b/sys/compat/svr4/svr4_types.h @@ -68,14 +68,14 @@ typedef struct timespec svr4_timestruc_t; #define svr4_omakedev(x,y) ((svr4_o_dev_t)((((x) << 8) & 0x7f00) | \ (((y) << 0) & 0x00ff))) -#define svr4_to_bsd_odev_t(d) makeudev(svr4_omajor(d), svr4_ominor(d)) +#define svr4_to_bsd_odev_t(d) makedev(svr4_omajor(d), svr4_ominor(d)) #define bsd_to_svr4_odev_t(d) svr4_omakedev(umajor(d), uminor(d)) #define svr4_major(x) ((int32_t)((((x) & 0xfffc0000) >> 18))) #define svr4_minor(x) ((int32_t)((((x) & 0x0003ffff) >> 0))) #define svr4_makedev(x,y) ((svr4_dev_t)((((x) << 18) & 0xfffc0000) | \ (((y) << 0) & 0x0003ffff))) -#define svr4_to_bsd_dev_t(d) makeudev(svr4_major(d), svr4_minor(d)) +#define svr4_to_bsd_dev_t(d) makedev(svr4_major(d), svr4_minor(d)) #define bsd_to_svr4_dev_t(d) svr4_makedev(umajor(d), uminor(d)) #endif /* !_SVR4_TYPES_H_ */ |