aboutsummaryrefslogtreecommitdiff
path: root/package/makedevs
diff options
context:
space:
mode:
authorGravatar Matt Fleming <matthew.fleming@imgtec.com>2010-09-24 14:43:17 +0100
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2011-01-14 22:50:39 +0100
commit7879a4ba3fb9effbf2b89ed744abf200d1386e1c (patch)
treeaa9c80dec46cd44130bbe9ed8d0d830b6376226f /package/makedevs
parenta7f40dfc1b676a34fe257dc0dd0a25dfe69416d3 (diff)
downloadbuildroot-7879a4ba3fb9effbf2b89ed744abf200d1386e1c.tar.gz
buildroot-7879a4ba3fb9effbf2b89ed744abf200d1386e1c.tar.bz2
makedevs: Add support for 16-bit major/minor numbers
Closes #2647 [Peter: Adjust for the real 12bit majors/20bit minors supported by Linux] Signed-off-by: Matt Fleming <matthew.fleming@imgtec.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/makedevs')
-rw-r--r--package/makedevs/makedevs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/makedevs/makedevs.c b/package/makedevs/makedevs.c
index 5ca45e9aeb..a0e7450375 100644
--- a/package/makedevs/makedevs.c
+++ b/package/makedevs/makedevs.c
@@ -414,7 +414,7 @@ int main(int argc, char **argv)
if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u", name,
&type, &mode, user, group, &major,
&minor, &start, &increment, &count)) ||
- ((major | minor | start | count | increment) > 255))
+ ((major | minor | start | count | increment) > 0xfffff))
{
if (*line=='\0' || *line=='#' || isspace(*line))
continue;
@@ -488,7 +488,7 @@ int main(int argc, char **argv)
int i;
char *full_name_inc;
- full_name_inc = xmalloc(strlen(full_name) + 4);
+ full_name_inc = xmalloc(strlen(full_name) + 8);
for (i = start; i < count; i++) {
sprintf(full_name_inc, "%s%d", full_name, i);
rdev = makedev(major, minor + (i * increment - start));