summaryrefslogtreecommitdiff
path: root/udev-add.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-02-12 01:14:48 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:26 -0700
commitede4308a803131f473efed3dc3246ffac7163dfa (patch)
tree4da08a0d04f5e13f7002f828d31465b892362f8c /udev-add.c
parent2e31718495a89e6b582240ed527950f78e7d1849 (diff)
[PATCH] remove some more KLIBC fixups that are no longer needed.
Diffstat (limited to 'udev-add.c')
-rw-r--r--udev-add.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/udev-add.c b/udev-add.c
index 9f07d22ec6..fedc8f0fc8 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -109,19 +109,12 @@ static int create_node(struct udevice *dev)
int retval = 0;
uid_t uid = 0;
gid_t gid = 0;
- dev_t res;
int i;
int tail;
strncpy(filename, udev_root, sizeof(filename));
strncat(filename, dev->name, sizeof(filename));
-#ifdef __KLIBC__
- res = (dev->major << 8) | (dev->minor);
-#else
- res = makedev(dev->major, dev->minor);
-#endif
-
switch (dev->type) {
case 'b':
dev->mode |= S_IFBLK;
@@ -144,7 +137,7 @@ static int create_node(struct udevice *dev)
info("creating device node '%s'", filename);
dbg("mknod(%s, %#o, %u, %u)", filename, dev->mode, dev->major, dev->minor);
- retval = mknod(filename, dev->mode, res);
+ retval = mknod(filename, dev->mode, makedev(dev->major, dev->minor));
if (retval != 0)
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
filename, dev->mode, dev->major, dev->minor, strerror(errno));