From 15139b8a623748e7d24b18f12e920d94743d8c52 Mon Sep 17 00:00:00 2001 From: "tklauser@access.unizh.ch" Date: Tue, 12 Apr 2005 01:05:03 +0200 Subject: [PATCH] [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. --- test/udev-test.pl | 1 + udev_add.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.39.5