From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] udevd test script
Date: Sat, 17 Apr 2004 01:33:07 +0000 [thread overview]
Message-ID: <20040417013307.GD14096@vrfy.org> (raw)
In-Reply-To: <20040415201141.GA11625@vrfy.org>
[-- Attachment #1: Type: text/plain, Size: 700 bytes --]
On Sat, Apr 17, 2004 at 03:30:29AM +0200, Kay Sievers wrote:
> On Sat, Apr 17, 2004 at 02:04:55AM +0200, Kay Sievers wrote:
> > On Fri, Apr 16, 2004 at 04:04:42PM -0700, Greg KH wrote:
> > > Oh, and if you run the latest udev_test.pl, we have a bunch more tests,
> > > including a few that fail, if you were looking for something to do :)
> >
> > Will do it. We need to change apply_format(). I tries to expand the '%%'
> > with the next iteration over the string and removes the '%'.
>
> The tests are all successful now.
> If this patch breaks something else, we simply have too few tests :)
Sorry, this silly keyboard layout with the 'y' next to the 'a' :)
Here is the patch too.
thanks,
Kay
[-- Attachment #2: 01-percent-escape.patch --]
[-- Type: text/plain, Size: 1012 bytes --]
===== namedev.c 1.139 vs edited =====
--- 1.139/namedev.c Fri Apr 2 11:55:14 2004
+++ edited/namedev.c Sat Apr 17 03:23:25 2004
@@ -199,23 +199,21 @@
struct sysfs_attribute *tmpattr;
pos = string;
-
while (1) {
- pos = strchr(string, '%');
- if (pos != NULL) {
- pos[0] = '\0';
- tail = pos+1;
- len = get_format_len(&tail);
- c = tail[0];
- strfieldcpy(temp, tail+1);
- tail = temp;
- } else {
+ pos = strchr(pos, '%');
+ if (pos == NULL)
break;
- }
- dbg("format=%c, string='%s', tail='%s'",c , string, tail);
+ pos[0] = '\0';
+ tail = pos+1;
+ len = get_format_len(&tail);
+ c = tail[0];
+ strfieldcpy(temp, tail+1);
+ tail = temp;
+ dbg("format=%c, string='%s', tail='%s'",c , string, tail);
attr = get_format_attribute(&tail);
+
switch (c) {
case 'b':
if (strlen(udev->bus_id) == 0)
@@ -286,6 +284,7 @@
break;
case '%':
strfieldcatmax(string, "%", maxsize);
+ pos++;
break;
default:
dbg("unknown substitution type '%%%c'", c);
next prev parent reply other threads:[~2004-04-17 1:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 20:11 [PATCH] udevd test script Kay Sievers
2004-04-16 23:04 ` Greg KH
2004-04-17 0:04 ` Kay Sievers
2004-04-17 0:16 ` Greg KH
2004-04-17 0:21 ` Kay Sievers
2004-04-17 0:35 ` Greg KH
2004-04-17 1:30 ` Kay Sievers
2004-04-17 1:33 ` Kay Sievers [this message]
2004-04-17 2:21 ` Nick Yin
2004-04-21 16:50 ` 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=20040417013307.GD14096@vrfy.org \
--to=kay.sievers@vrfy.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).