From: tklauser@access.unizh.ch Date: Mon, 11 Apr 2005 23:05:03 +0000 (+0200) Subject: [PATCH] fix stupid all_partitions bug X-Git-Tag: 057~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15139b8a623748e7d24b18f12e920d94743d8c52;p=systemd [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. --- diff --git a/test/udev-test.pl b/test/udev-test.pl index c1dc8b2f..3172d330 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -418,6 +418,7 @@ EOF subsys => "block", devpath => "/block/sda", exp_name => "boot_disk15" , + exp_majorminor => "8:15", rules => <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); } }