From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [udev] updated man, subdirs, ownership, namedev enum patches
Date: Thu, 13 Nov 2003 08:30:08 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106871228701891@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106860942327356@msgid-missing>
On Wed, Nov 12, 2003 at 10:23:25PM -0800, Greg KH wrote:
> On Wed, Nov 12, 2003 at 02:23:30PM +0100, Kay Sievers wrote:
> > On Tue, Nov 11, 2003 at 07:53:55PM -0800, Greg KH wrote:
> > > On Wed, Nov 05, 2003 at 08:31:28PM +0100, Kay Sievers wrote:
> > > > 04-namedev.c-cleanup.diff
> > > > remove part of udev that appends the kernel enumeration to character devices
> > > > in LABEL method: NAME="webcam" results in /udev/webcam0
> > >
> > > I think this patch breaks partition naming, did you try it on them?
> > > Hm, are you sure this patch is correct?
> >
> > I think so, block devices are handled at line 580. At line 626 the last
> > digit from kernel name is appended to _every_ device including char devs.
> > Partition naming seems ok with the patch, but i may miss something here.
>
> Hm, if you take those lines out, I can't name a partition with the
> number at the end of the name. Yeah, that's a hack, and I need to fix
> it up.
What do you mean?
The partition name is crated with the number.
Nov 13 09:01:24 pim udev[13671]: main: version 005
Nov 13 09:01:24 pim udev[13671]: main: looking at /block/hda/hda1
Nov 13 09:01:24 pim udev[13671]: get_dirs: sysfs_path = /sys
Nov 13 09:01:24 pim udev[13671]: namedev_init_config: opening /etc/udev/udev.config to read as config
Nov 13 09:01:24 pim udev[13671]: namedev_init_permissions: opening /etc/udev/udev.permissions to read as permissions config
Nov 13 09:01:24 pim udev[13671]: sleep_for_dev: looking for /sys/block/hda/hda1/dev
Nov 13 09:01:24 pim udev[13671]: get_class_dev: looking at /sys/block/hda/hda1
Nov 13 09:01:24 pim udev[13671]: get_class_dev: class_dev->name = hda1
Nov 13 09:01:24 pim udev[13671]: get_major_minor: dev = 3:1
Nov 13 09:01:24 pim udev[13671]: get_major_minor: found major = 3, minor = 1
Nov 13 09:01:24 pim udev[13671]: udev_add_device: name = hda1
Nov 13 09:01:24 pim udev[13671]: create_node: mknod(/udev/hda1, 060666,3, 1)
Yes, it doesn't append the number when a label is specified for a
partition. But what when i want my partition labeled "data" not "data1"
LABEL, BUS="ide", size="117210177", NAME="data"
Nov 13 09:08:45 pim udev[13871]: main: version 005
Nov 13 09:08:45 pim udev[13871]: main: looking at /block/hdb/hdb1
Nov 13 09:08:45 pim udev[13871]: get_dirs: sysfs_path = /sys
Nov 13 09:08:45 pim udev[13871]: namedev_init_config: opening /etc/udev/udev.config to read as config
Nov 13 09:08:45 pim udev[13871]: namedev_init_permissions: opening /etc/udev/udev.permissions to read as permissions config
Nov 13 09:08:45 pim udev[13871]: sleep_for_dev: looking for /sys/block/hdb/hdb1/dev
Nov 13 09:08:45 pim udev[13871]: get_class_dev: looking at /sys/block/hdb/hdb1
Nov 13 09:08:45 pim udev[13871]: get_class_dev: class_dev->name = hdb1
Nov 13 09:08:45 pim udev[13871]: get_major_minor: dev = 3:65
Nov 13 09:08:45 pim udev[13871]: get_major_minor: found major = 3, minor = 65
Nov 13 09:08:45 pim udev[13871]: udev_add_device: name = data1
Nov 13 09:08:45 pim udev[13871]: create_node: mknod(/udev/data1, 060666, 3, 65)
This is not what i would expect!
And i don't want my WebCam named with the number appended:
But without the patch this is impossible:
LABEL, BUS="usb", model="Creative Labs WebCam 3", NAME="webcam"
Nov 13 09:19:19 pim udev[14015]: main: version 005
Nov 13 09:19:19 pim udev[14015]: main: looking at /class/video4linux/video0
Nov 13 09:19:19 pim udev[14015]: get_dirs: sysfs_path = /sys
Nov 13 09:19:19 pim udev[14015]: namedev_init_config: opening /etc/udev/udev.config to read as config
Nov 13 09:19:19 pim udev[14015]: namedev_init_permissions: opening /etc/udev/udev.permissions to read as permissions config
Nov 13 09:19:19 pim udev[14015]: sleep_for_dev: looking for /sys/class/video4linux/video0/dev
Nov 13 09:19:19 pim kernel: drivers/usb/media/ov511.c: Device at usb-0000:00:1d.1-2.1 registered to minor 0
Nov 13 09:19:20 pim udev[14015]: sleep_for_dev: looking for /sys/class/video4linux/video0/dev
Nov 13 09:19:20 pim udev[14015]: get_class_dev: looking at /sys/class/video4linux/video0
Nov 13 09:19:20 pim udev[14015]: get_class_dev: class_dev->name = video0
Nov 13 09:19:20 pim udev[14015]: get_major_minor: dev = 81:0
Nov 13 09:19:20 pim udev[14015]: get_major_minor: found major = 81, minor = 0
Nov 13 09:19:20 pim udev[14015]: udev_add_device: name = webcam0
Nov 13 09:19:20 pim udev[14015]: create_node: mknod(/udev/webcam0, 020600, 81, 0)
How can you create a partition name or name for any other char device
by a LABEL method without these "magic" number?
Sorry, do i get something completely wrong?
thanks,
Kay
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
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
next prev parent reply other threads:[~2003-11-13 8:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 3:53 [udev] updated man, subdirs, ownership, namedev enum patches Greg KH
2003-11-12 13:23 ` Kay Sievers
2003-11-13 6:23 ` Greg KH
2003-11-13 8:30 ` Kay Sievers [this message]
2003-11-13 19:49 ` Greg KH
2003-11-15 16:09 ` Kay Sievers
2003-11-17 17:33 ` Arnd Bergmann
2003-11-18 1:00 ` Greg KH
2003-11-18 1:14 ` Greg KH
2003-11-18 3:15 ` Kay Sievers
2003-11-18 12:09 ` Arnd Bergmann
2003-11-18 12:17 ` Arnd Bergmann
2003-11-19 0:24 ` Greg KH
2003-11-19 23:40 ` Greg KH
2003-11-19 23:42 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-11-05 19:38 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=marc-linux-hotplug-106871228701891@msgid-missing \
--to=kay.sievers@vrfy.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.