From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin Schwenke" Date: Thu, 28 Apr 2005 23:15:23 +0000 Subject: Re: udev & kernel names Message-Id: <17009.28299.948670.107116@rover.ozlabs.ibm.com> List-Id: References: <20050426231516.GD2740@us.ibm.com> In-Reply-To: <20050426231516.GD2740@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org >>>>> "Kay" = Kay Sievers writes: Kay> What about centralizing error messages at a common place and Kay> use the DEVPATH of the device instead? It's the key to look Kay> up the device-name in the udev-database and probably the best Kay> namespace to use. There would also no need to print driver or Kay> bus-id, cause that can be read from the devpath-location in Kay> sysfs. A central place for error logging would be nice, Kay> cause we would be able to use a better transport than the Kay> kernel-log to parse. A DEVPATH value like /block/sda? That includes the kernel name... :-( That's one part of the non-kernel-name-canonical-labels argument I haven't been able to convince myself of. If you don't have kernel names, then the subsystem stuff changes fairly fundamentally. When I modprobe scsi_debug, I see the following events: add-bus-/bus/pseudo add-module-/module/scsi_debug add-pseudo-/devices/pseudo_0/adapter0 add-bus-/bus/pseudo/devices add-bus-/bus/pseudo/drivers add-scsi_host-/class/scsi_host/host2 add-scsi-/devices/pseudo_0/adapter0/host2/target2:0:0/2:0:0:0 add-drivers-/bus/pseudo/drivers/scsi_debug add-scsi_generic-/class/scsi_generic/sg0 add-scsi_device-/class/scsi_device/2:0:0:0 add-block-/block/sda One thing that concerns me is that I don't see anything that adds the SCSI bus link: add-scsi-/bus/scsi/devices/2:0:0:0 That would seems to be the most easily catchable event for a SCSI device ... However, for the block subsystem, these would be about as meaningful as /block/sda: add-block-/block/major/minor add-block-/block/major,minor That's incredibly sane. Block devices, for example, don't really have names: they have major and minor numbers... At the moment you can guess the type of block device from the basename of /block/sda. However, that's only a "guess". Looking at the "device" link in /block/major,minor gives you at least as much information. peace & happiness, martin -- Martin Schwenke IBM OzLabs - Linux Technology Centre http://ozlabs.au.ibm.com/~martins/ ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix _______________________________________________ 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