From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arioch Date: Thu, 18 Aug 2005 21:04:56 +0000 Subject: Re: +rule: query device inode by Major and Minor - am i inventing Message-Id: List-Id: References: <4300318B.8040505@nm.ru> In-Reply-To: <4300318B.8040505@nm.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org Greg KH пишет: >>But what should tell character devices from, say, network interfaces ? > Perhaps SUBSYSTEM=="net"? :) way to fragile rules. SUBSYSTEM!="block", SUBSYSTEM!="net", .... ...and tomorrow this script would be run on another platform, that has subsystem i did not have. Or just new subsystem was invented. And the rule immediately fails. Those matches, they do not tell character devices from subsystem, but they tell knon (to me) subsystems from the unknown rest (which i believe to be character devices and nothing else). Guess i also can dp something like PROGRAM="/bin/file %P", Result=="*character*" but... ...then i again can stumble upon stderr ...and i cannot call another program Oh, i guess i can determine something, then ENV{tmp_xxx}:='flag', then use it later. (i remember i heard that ENV can be LValue now) Or again i can use scripts. but that seems that rather simple task needs rather complex actions to implement :-) >>Alas, i don't know where to et list of subsystems :-( > > 'ls /sys/class/' is a good place to start (becides the block subsystem, > which is still in /sys/block/ due to a whole bunch of kernel coding > reasons...) ...assuming my kernel has all of them. kernel docs sysfs.txt and kobject.txt are written for oldschool kernel hacker introducing him to new concepts. I wish to see someday SYSFS in 30 days for users ;) ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ 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