diff options
author | Bill Paul <wpaul@FreeBSD.org> | 2004-01-13 00:29:17 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 2004-01-13 00:29:17 +0000 |
commit | 93335315ade13b24c6f9bd1cbaf7eb86b691b68c (patch) | |
tree | 001521e5fff7c8961058da2e55dfd5b8b3b8ee21 /usr.sbin | |
parent | d2ec2cabee8125981ef71d2d6ed58dd9cba40a05 (diff) | |
download | src-93335315ade13b24c6f9bd1cbaf7eb86b691b68c.tar.gz src-93335315ade13b24c6f9bd1cbaf7eb86b691b68c.zip |
Yet another inf file handling tweak: when checking for Ndi\Params\foo
keys, don't just do a substring match on "Ndi\Params". Instead, check
explicitly for strings that begin with "Ndi\Params". Why? Because it's
possible to create your own keys with different paths, like
"PROSetNdi\NdiExt\Params" which is what Intel does in their PRO/1000
driver's .INF file.
Notes
Notes:
svn path=/head/; revision=124452
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ndiscvt/inf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ndiscvt/inf.c b/usr.sbin/ndiscvt/inf.c index 0b2ee209fc10..1ac533641e2a 100644 --- a/usr.sbin/ndiscvt/inf.c +++ b/usr.sbin/ndiscvt/inf.c @@ -254,8 +254,8 @@ dump_addreg(const char *s, int devidx) fprintf(ofp, "\n\t{ \"%s\" }, %d },", reg->value == NULL ? "" : stringcvt(reg->value), devidx); - } else if (strcasestr(reg->subkey, - "Ndi\\params") != NULL && + } else if (strncasecmp(reg->subkey, + "Ndi\\params", strlen("Ndi\\params")-1) == 0 && strcasecmp(reg->key, "ParamDesc") == 0) dump_paramreg(sec, reg, devidx); } |