diff options
author | phk <phk@FreeBSD.org> | 2004-02-07 18:54:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-02-07 18:54:34 +0000 |
commit | 71932b3b20e59f73b10d2210ad913d71163a31b8 (patch) | |
tree | 9c4597e107ef83a87638eda29afb310ea10d1f6b /sys/compat/svr4 | |
parent | db7086ef8b89376fa996d973563879ffcee74967 (diff) | |
download | FreeBSD-src-71932b3b20e59f73b10d2210ad913d71163a31b8.zip FreeBSD-src-71932b3b20e59f73b10d2210ad913d71163a31b8.tar.gz |
I guess nobody has needed to use the SVR4olator to create device
nodes, or if they did, they're now locked away on the Kurt Gdel
memorial home for the numerically confused:
Don't cast a kernel pointer (from makedev(9)) to an integer (maj+minor combo).
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_types.h b/sys/compat/svr4/svr4_types.h index 410746b..3421647 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) makedev(svr4_omajor(d), svr4_ominor(d)) +#define svr4_to_bsd_odev_t(d) makeudev(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) makedev(svr4_major(d), svr4_minor(d)) +#define svr4_to_bsd_dev_t(d) makeudev(svr4_major(d), svr4_minor(d)) #define bsd_to_svr4_dev_t(d) svr4_makedev(umajor(d), uminor(d)) #endif /* !_SVR4_TYPES_H_ */ |