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>
This commit is contained in:
parent
6804eec625
commit
4844884d13
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue