From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Klauser Date: Mon, 11 Apr 2005 13:50:51 +0000 Subject: Re: Feature/Bug? udev/hotplug creates device nodes with strange major/minor numbers Message-Id: <20050411135051.GA4366@neon> List-Id: References: <20050410131837.GB21307@gamma.logic.tuwien.ac.at> In-Reply-To: <20050410131837.GB21307@gamma.logic.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, Apr 11, 2005 at 03:16:20PM +0200, Kay Sievers wrote: > 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. Cheers, Tobias --- udev-056.orig/udev_add.c 2005-03-28 12:59:12.000000000 +0200 +++ udev-056/udev_add.c 2005-04-11 15:47:24.700854424 +0200 @@ -182,7 +182,7 @@ static int create_node(struct udevice *u 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); } } ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel