From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Date: Wed, 17 Mar 2004 17:01:25 +0000 Subject: Re: Non-hardware devices like loop: another idea Message-Id: <20040317100125.A21012@lnxi.com> List-Id: References: <200403122003.00557.patrakov@ums.usu.ru> In-Reply-To: <200403122003.00557.patrakov@ums.usu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Mar 16 2004 at 23:39, Alexander E. Patrakov wrote: > Now I see where the confusion comes from. You misunderstood my proposal. > Sorry for not making it clear enough. > > I don't propose to parse these files at all. I want to probe the modules > corresponding to the *-major-* aliases unconditionally. Let's review the > scenarios for the loop module. > > 1) It is in the kernel. Then the /sys/block/loop0/dev file will be > present upon boot, the udev initscript as supplied with the current > version of udev will notice it while walking the /sys/block hierarchy, > and /dev/loop0 will be created from the initscript. Cool, I didn't realize this. > 2) It is a module. Then the modified initscript will notice that there > is a block-major line in /lib/modules//modules.alias with the > "loop" as its third field. You suggest to create /dev/loop0 based on > this information. I suggest to just call "modprobe loop" instead. The > kernel will send the hotplug event and the udev program as supplied in > the current udev package will react upon that event by creating /dev/loop0. I wasn't suggesting anything; merely pointed out that your solution was dependent on modules. Ultimately udev will create /dev entries as it walks sysfs (so it takes care of /dev/loopX, etc); but there are aspects of the kernel that aren't sysfs-ified (e.g. tun). Not to mention if the devices don't support hotplug udev will never get triggered. So wouldn't a better option be to make the various devices that don't support hotplug and/or sysfs support them? Then udev just needs some new rules. Infering information from the module load (via modules.alias) is fragile. Are there devices that can't and/or shouldn't be hotplug/sysfs-ified? Mike ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&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