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
This commit is contained in:
Colin Cross 2010-09-03 14:13:05 -07:00 committed by Android Git Automerger
commit 3eaa4e52d3

View file

@ -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