summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-17 17:16:53 +0000
committerphk <phk@FreeBSD.org>2004-06-17 17:16:53 +0000
commit40dd98a3bd2049465e7644b361b60da41a46efa0 (patch)
treefe8b297144afd6d6f7db41275c72cb5eb663ec02 /sys/compat/svr4
parent9acfe1e733142ca875624a3acbf96c4ff27b36a4 (diff)
downloadFreeBSD-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/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_socket.c2
-rw-r--r--sys/compat/svr4/svr4_socket.h4
-rw-r--r--sys/compat/svr4/svr4_stream.c2
-rw-r--r--sys/compat/svr4/svr4_types.h4
4 files changed, 6 insertions, 6 deletions
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_ */
OpenPOWER on IntegriCloud