linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@access.unizh.ch>
To: linux-hotplug@vger.kernel.org
Subject: Re: Feature/Bug? udev/hotplug creates device nodes with strange major/minor numbers
Date: Mon, 11 Apr 2005 13:50:51 +0000	[thread overview]
Message-ID: <20050411135051.GA4366@neon> (raw)
In-Reply-To: <20050410131837.GB21307@gamma.logic.tuwien.ac.at>

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_id\x14396&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

  parent reply	other threads:[~2005-04-11 13:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-10 13:18 Feature/Bug? udev/hotplug creates device nodes with strange major/minor numbers Norbert Preining
2005-04-11 12:21 ` Feature/Bug? udev/hotplug creates device nodes with strange Kay Sievers
2005-04-11 12:55 ` Feature/Bug? udev/hotplug creates device nodes with strange major/minor numbers Norbert Preining
2005-04-11 13:16 ` Feature/Bug? udev/hotplug creates device nodes with strange Kay Sievers
2005-04-11 13:50 ` Tobias Klauser [this message]
2005-04-11 14:30 ` Feature/Bug? udev/hotplug creates device nodes with strange major/minor numbers Norbert Preining
2005-04-11 14:56 ` Feature/Bug? udev/hotplug creates device nodes with strange Kay Sievers
2005-04-11 14:58 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050411135051.GA4366@neon \
    --to=tklauser@access.unizh.ch \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).