summaryrefslogtreecommitdiff
path: root/udev_add.c
diff options
context:
space:
mode:
authortklauser@access.unizh.ch <tklauser@access.unizh.ch>2005-04-12 01:05:03 +0200
committerGreg KH <gregkh@suse.de>2005-04-26 23:55:01 -0700
commit15139b8a623748e7d24b18f12e920d94743d8c52 (patch)
tree84f4a13f1d12f5188df1d8968c37ae0e91e5abe8 /udev_add.c
parent05bd6efb41b6a80378cc4f6e7427a302b4953541 (diff)
[PATCH] fix stupid all_partitions bug
> On Mon, 2005-04-11 at 14:55 +0200, Norbert Preining wrote: > > On Mon, 11 Apr 2005, Kay Sievers wrote: > > > > brw-rw---- 1 root root 8, 0 2005-04-10 14:58 /dev/sdcard > > > > brw-rw---- 1 root root 8, 1 2005-04-10 14:58 /dev/sdcard1 > > > > brw-rw---- 1 root root 8, 1 2005-04-10 14:58 /dev/sdcard2 > > > > brw-rw---- 1 root root 8, 1 2005-04-10 14:58 /dev/sdcard3 > > > > > > This looks broken. > > > > Good to hear. Yeah, I guess it's broken. In create_node() in udev_add.c there is always added 1 to the minor number, thus the error. The attached patch should fix this.
Diffstat (limited to 'udev_add.c')
-rw-r--r--udev_add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev_add.c b/udev_add.c
index 5fff3836e3..b1e7265a3c 100644
--- a/udev_add.c
+++ b/udev_add.c
@@ -182,7 +182,7 @@ static int create_node(struct udevice *udev, struct sysfs_class_device *class_de
snprintf(partitionname, sizeof(partitionname), "%s%d", filename, i);
partitionname[sizeof(partitionname)-1] = '\0';
- part_devt = makedev(major(udev->devt), minor(udev->devt)+1);
+ part_devt = makedev(major(udev->devt), minor(udev->devt) + i);
udev_make_node(udev, partitionname, part_devt, udev->mode, uid, gid);
}
}