From: Patrick Mansfield <patmans@us.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] fix NAME="foo-%c{N}" gets a truncated name
Date: Wed, 03 Mar 2004 23:57:04 +0000 [thread overview]
Message-ID: <20040303155704.A21381@beaverton.ibm.com> (raw)
In-Reply-To: <20040303144334.A20521@beaverton.ibm.com>
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 => <<EOF
+BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{7}"
+EOF
+ },
+ {
+ desc => "substitute the second to last argument",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "my-foo8" ,
+ conf => <<EOF
+BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{6}"
+EOF
+ },
+ {
desc => "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_id\x1470&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
next prev parent reply other threads:[~2004-03-03 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-03 22:43 [PATCH] fix NAME="foo-%c{N}" gets a truncated name Patrick Mansfield
2004-03-03 22:58 ` Kay Sievers
2004-03-03 23:46 ` Kay Sievers
2004-03-03 23:57 ` Patrick Mansfield [this message]
2004-03-04 0:56 ` Greg KH
2004-03-04 0:56 ` Greg KH
2004-03-04 3:09 ` Kay Sievers
2004-03-04 18:57 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040303155704.A21381@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.