From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Mon, 15 Dec 2003 22:36:04 +0000 Subject: Re: [udev] don't rely on field order in namedev_parse Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Dec 12, 2003 at 08:36:03PM +0100, Kay Sievers wrote: > Hi, > here is a patch for the namedev-parser not to rely on the order of the > fields given in the rule. The error handling now is relaxed, if a field is given > twice, the last one wins. If a key is unknown we use it as a sysfs attribute. > > It is not as efficient as the current version, > cause we need to loop over the list of known fields for every given field, > but we are free to sort the fields in udev.rules. > What do you think? I like the idea, it really cleans up the code a lot. But it looks like it breaks the fact that we might want to test for the sysfs file "name" in a rule, right? > diff -Nru a/namedev.h b/namedev.h > --- a/namedev.h Fri Dec 12 20:21:01 2003 > +++ b/namedev.h Fri Dec 12 20:21:01 2003 > @@ -44,11 +44,6 @@ > #define ID_SIZE 50 > #define PLACE_SIZE 50 > > -#define TYPE_LABEL "LABEL" > -#define TYPE_NUMBER "NUMBER" > -#define TYPE_TOPOLOGY "TOPOLOGY" > -#define TYPE_REPLACE "REPLACE" > -#define TYPE_CALLOUT "CALLOUT" Why remove these? thanks, greg k-h ------------------------------------------------------- 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