summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-11-14 22:12:11 +0000
committerRob Landley <rob@landley.net>2008-11-14 22:12:11 +0000
commit2fa869ff395997837954df74858cdd5a82c42c05 (patch)
tree984824a6d6bec6ebc59efb2e093195d065bc5251
parent6bd2adf45125649541fdcdad99971d55d78486c9 (diff)
Current kernels support more than 8 bit major/minor. Pass dev_t through to
the kernel unmolested.
-rw-r--r--libc/sysdeps/linux/common/mknod.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/mknod.c b/libc/sysdeps/linux/common/mknod.c
index b0f07b12d..e16c49025 100644
--- a/libc/sysdeps/linux/common/mknod.c
+++ b/libc/sysdeps/linux/common/mknod.c
@@ -19,10 +19,6 @@ static __inline__ _syscall3(int, __syscall_mknod, const char *, path,
int mknod(const char *path, mode_t mode, dev_t dev)
{
- /* We must convert the dev_t value to a __kernel_dev_t */
- __kernel_dev_t k_dev;
-
- k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
- return __syscall_mknod(path, mode, k_dev);
+ return __syscall_mknod(path, mode, (__kernel_dev_t)dev);
}
libc_hidden_def(mknod)