From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Milburn <dmilburn@redhat.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-core: support wildcard matching in ata_blacklist_entry
Date: Thu, 16 Aug 2007 15:07:07 -0400 [thread overview]
Message-ID: <46C4A05B.4000007@garzik.org> (raw)
In-Reply-To: <20070809003134.12de8576@the-village.bc.nu>
Alan Cox wrote:
> On Wed, 8 Aug 2007 15:20:57 -0500
> David Milburn <dmilburn@redhat.com> wrote:
>
>> Support the use of '*' in model_num and model_rev entries
>> in ata_device_blacklist[].
>>
>> CC: alan@lxorguk.ukuu.org.uk
>> Signed-off-by: David Milburn <dmilburn@redhat.com>
>
> Suggestion: Pull the match function out of line so you don't have two
> copies of it and can remove all the wacky ? operators
>
> something like this ? (untested)
>
> strpatterncmp(const char *name, const char *patt)
> {
> const char *p = strchr(patt, '*');
> if (p == NULL)
> p = patt + strlen(patt);
> return strncmp(name, patt, p-patt);
> }
Seems quite sane to me...
And I support the addition of wildcard operators; that should make
maintenance a bit easier.
next prev parent reply other threads:[~2007-08-16 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 20:20 [PATCH] libata-core: support wildcard matching in ata_blacklist_entry David Milburn
2007-08-08 23:31 ` Alan Cox
2007-08-16 19:07 ` Jeff Garzik [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-09 20:49 David Milburn
2007-09-20 20:33 ` Jeff Garzik
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=46C4A05B.4000007@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dmilburn@redhat.com \
--cc=linux-ide@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.