diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2013-05-29 11:51:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-30 20:56:28 +0100 |
commit | 0a878426bee607a7d961ba475a7ec7e89115df35 (patch) | |
tree | bfc6eacf82dd6e11aad039baf411f68c3df44df0 /meta/recipes-devtools | |
parent | e7796880164d6a37c2699a94e1c5391337c5eaa5 (diff) | |
download | openembedded-core-contrib-0a878426bee607a7d961ba475a7ec7e89115df35.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.
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')
-rw-r--r-- | meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 2 |
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 247d6c1c3cb..d58e8911a66 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 { |