summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/makedevs
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:59:12 +0100
commit4844884d13fc8422f6cb088b92f160eaa8e4e1b9 (patch)
tree95be7ee4e7a08352a07c51228902b675cf63232c /meta/recipes-devtools/makedevs
parent6804eec62515c57df81a385f84573982d27b22be (diff)
downloadast2050-yocto-poky-4844884d13fc8422f6cb088b92f160eaa8e4e1b9.zip
ast2050-yocto-poky-4844884d13fc8422f6cb088b92f160eaa8e4e1b9.tar.gz
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. (From OE-Core rev: 0a878426bee607a7d961ba475a7ec7e89115df35) 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/recipes-devtools/makedevs')
-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 247d6c1..d58e891 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 {
OpenPOWER on IntegriCloud