summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2013-05-29 11:51:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 20:56:28 +0100
commit0a878426bee607a7d961ba475a7ec7e89115df35 (patch)
treebfc6eacf82dd6e11aad039baf411f68c3df44df0 /meta
parente7796880164d6a37c2699a94e1c5391337c5eaa5 (diff)
downloadopenembedded-core-0a878426bee607a7d961ba475a7ec7e89115df35.tar.gz
openembedded-core-0a878426bee607a7d961ba475a7ec7e89115df35.tar.bz2
openembedded-core-0a878426bee607a7d961ba475a7ec7e89115df35.zip
makedevs: Correct the device number calculation for blocks of devices
If the increment > 1 and the start > 0 then the calculation for the minor device number was incorrect. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
index 247d6c1c3c..d58e8911a6 100644
--- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
@@ -226,7 +226,7 @@ static int interpret_table_entry(char *line)
sprintf(path, "%s/%s%d", rootdir, name, i);
/* FIXME: MKDEV uses illicit insider knowledge of kernel
* major/minor representation... */
- rdev = MKDEV(major, minor + (i * increment - start));
+ rdev = MKDEV(major, minor + (i - start) * increment);
add_new_device(buf, path, uid, gid, mode, rdev);
}
} else {