Re: [PATCH] libata-core: support wildcard matching in ata_blacklist_entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Cox wrote:
On Wed, 8 Aug 2007 15:20:57 -0500
David Milburn <dmilburn@xxxxxxxxxx> wrote:

Support the use of '*' in model_num and model_rev entries
in ata_device_blacklist[].

CC: alan@xxxxxxxxxxxxxxxxxxx
Signed-off-by: David Milburn <dmilburn@xxxxxxxxxx>

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.


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux