1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

[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.
This commit is contained in:
tklauser@access.unizh.ch 2005-04-12 01:05:03 +02:00 committed by Greg KH
parent 05bd6efb41
commit 15139b8a62
2 changed files with 2 additions and 1 deletions

View File

@ -418,6 +418,7 @@ EOF
subsys => "block",
devpath => "/block/sda",
exp_name => "boot_disk15" ,
exp_majorminor => "8:15",
rules => <<EOF
BUS=="scsi", SYSFS{vendor}=="IBM-ESXS", NAME{all_partitions}="boot_disk"
EOF

View File

@ -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);
}
}