From 0a878426bee607a7d961ba475a7ec7e89115df35 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Wed, 29 May 2013 11:51:02 +0000 Subject: 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 Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/recipes-devtools') 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 { -- cgit 1.2.3-korg