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.
This commit is contained in:
Bill Paul 2004-01-13 00:29:17 +00:00
parent d2ec2cabee
commit 93335315ad

View File

@ -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);
}