From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 25 Dec 2003 21:04:40 +0000 Subject: Re: Possible udev bug and some questions Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Dec 25, 2003 at 10:35:37PM +0200, Martin Schlemmer wrote: > On Thu, 2003-12-25 at 22:00, Kay Sievers wrote: > > On Thu, Dec 25, 2003 at 09:52:53PM +0200, Martin Schlemmer wrote: > > > > here is a patch for the script and a small fix for namedev to work with... > > > > > > > > > > BTW, there is a slight issue with your version of the script - it drops > > > the /dev/discs/part* symlinks. Patch against your version attached. > > > > Are you sure devfs does partitions in there? > > It only lists the discs on my machine: > > > > kay@pim:~/src/udev.kay$ tree /devfs/discs/ > > /devfs/discs/ > > |-- disc0 -> ../ide/host0/bus0/target0/lun0 > > |-- disc1 -> ../ide/host0/bus0/target1/lun0 > > `-- disc2 -> ../ide/host2/bus0/target0/lun0 > > > > Well, seems like you modified some other things to the script as > well. Here is a 2.4 box (and we have been using /dev/discs/*/disc > to call hdparm for ages on 2.4 boxes): > > -- > $ ls -l /dev/discs/disc0/ > total 0 > brw------- 1 root root 3, 0 Jan 1 1970 disc > brw------- 1 root root 3, 1 Jan 1 1970 part1 > brw------- 1 root root 3, 2 Jan 1 1970 part2 > brw------- 1 root root 3, 3 Jan 1 1970 part3 > azarah@gateway azarah $ uname -a > Linux gateway.lan 2.4.17 #2 Wed Aug 20 22:32:11 SAST 2003 i686 Pentium > III (Katmai) GenuineIntel GNU/Linux > azarah@gateway azarah $ What the hell is this? Is it something in your devfs.conf, that creates this? On 2.4.20 I get: puk:~# tree /devfs/discs/ /devfs/discs/ `-- disc0 -> ../ide/host0/bus0/target0/lun0 > Patch is attached to fix the other issue. It is a new version of > previous patch. Also note that /proc/ide/*/media contain 'disk' > for hdd's, so the call to get_dev_number() should have 'disk' > as second argument, and not 'disc' ... Yes, it should be 'disk' - i'm confused now :) If you call get_dev_number() with hda1 it will newer break at the current device, cause there is is no hda1 in the iterated list. So it's ever the last dis[ck] pim:/home/kay# ls -la /proc/ide/*/media -r--r--r-- 1 root root 0 Dec 25 21:54 /proc/ide/hda/media -r--r--r-- 1 root root 0 Dec 25 21:54 /proc/ide/hdb/media -r--r--r-- 1 root root 0 Dec 25 21:54 /proc/ide/hdc/media -r--r--r-- 1 root root 0 Dec 25 21:54 /proc/ide/hde/media thanks, Kay ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&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