summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-09-03 14:13:05 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-03 14:13:05 -0700
commit3eaa4e52d3fd958b2856d890bb15247aced2e13f (patch)
treec3b0f9f8a623d43ebe668a6f216b9e336ff505ac /init
parent14b91a829a9795e701b4f15cabc2770c40279bd5 (diff)
parent49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19 (diff)
downloadsystem_core-3eaa4e52d3fd958b2856d890bb15247aced2e13f.zip
system_core-3eaa4e52d3fd958b2856d890bb15247aced2e13f.tar.gz
system_core-3eaa4e52d3fd958b2856d890bb15247aced2e13f.tar.bz2
am 49b8124a: am 17dcc5c5: Use makedev helper for device major and minor numbers
Merge commit '49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19' * commit '49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19': Use makedev helper for device major and minor numbers
Diffstat (limited to 'init')
-rw-r--r--init/devices.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/init/devices.c b/init/devices.c
index 21e1ee3..5a580fa 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -181,11 +181,8 @@ static void make_device(const char *path, int block, int major, int minor)
mode_t mode;
dev_t dev;
- if(major > 255 || minor > 255)
- return;
-
mode = get_device_perm(path, &uid, &gid) | (block ? S_IFBLK : S_IFCHR);
- dev = (major << 8) | minor;
+ dev = makedev(major, minor);
/* Temporarily change egid to avoid race condition setting the gid of the
* device node. Unforunately changing the euid would prevent creation of
* some device nodes, so the uid has to be set with chown() and is still