[oe-commits] Peter Kjellerstedt : makedevs: Correct the device number calculation for blocks of devices

git at git.openembedded.org git at git.openembedded.org
Fri May 31 09:06:30 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 0a878426bee607a7d961ba475a7ec7e89115df35
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0a878426bee607a7d961ba475a7ec7e89115df35

Author: Peter Kjellerstedt <pkj at axis.com>
Date:   Wed May 29 11:51:02 2013 +0000

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 at axis.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../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 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 {



More information about the Openembedded-commits mailing list