From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Mansfield Date: Wed, 03 Mar 2004 23:57:04 +0000 Subject: Re: [PATCH] fix NAME="foo-%c{N}" gets a truncated name Message-Id: <20040303155704.A21381@beaverton.ibm.com> List-Id: References: <20040303144334.A20521@beaverton.ibm.com> In-Reply-To: <20040303144334.A20521@beaverton.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Mar 04, 2004 at 12:46:33AM +0100, Kay Sievers wrote: > On Wed, Mar 03, 2004 at 02:43:34PM -0800, Patrick Mansfield wrote: > > Here is a fix and a new test for the problem Atul hit, where if we have a > > NAME based on a result of the form: > > > > NAME="foo-%c{7}" > > > > udev truncates the name. Without any prefix (the foo- in this example), > > the rule was working OK. > > Here is a fix for the fix :) > > Sorry, I broke it yesterday. I have a patch without a temp string, but your patch works and is simpler. Here is a patch for some new tests. === test/udev-test.pl 1.40 vs edited ==--- 1.40/test/udev-test.pl Fri Feb 27 19:36:01 2004 +++ edited/test/udev-test.pl Wed Mar 3 15:21:04 2004 @@ -262,6 +262,24 @@ EOF }, { + desc => "characters before the %c{N} substitution", + subsys => "block", + devpath => "block/sda/sda3", + expected => "my-foo9" , + conf => < "substitute the second to last argument", + subsys => "block", + devpath => "block/sda/sda3", + expected => "my-foo8" , + conf => < "program result substitution (numbered part of)", subsys => "block", devpath => "block/sda/sda3", ------------------------------------------------------- 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