diff options
author | wpaul <wpaul@FreeBSD.org> | 2004-01-13 00:29:17 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2004-01-13 00:29:17 +0000 |
commit | 517573029df20e94d870062ccff78104aba4f35c (patch) | |
tree | 001521e5fff7c8961058da2e55dfd5b8b3b8ee21 /usr.sbin/ndiscvt | |
parent | 03135f1e85b442196816e16934e0a2735da0934c (diff) | |
download | FreeBSD-src-517573029df20e94d870062ccff78104aba4f35c.zip FreeBSD-src-517573029df20e94d870062ccff78104aba4f35c.tar.gz |
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.
Diffstat (limited to 'usr.sbin/ndiscvt')
-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 0b2ee20..1ac5336 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); } |