mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
launcher: don't warn about hook option conflicts (#771)
DLL hook options (-k and -z) allow multiple flags being specified in both spicecfg and via command line; they never conflict as they are additive. Remove the warning about option conflicts.
This commit is contained in:
@@ -1549,8 +1549,19 @@ int main_implementation(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// print out conflicts
|
// print out conflicts
|
||||||
size_t conflicts = 0;
|
size_t conflicts = 0;
|
||||||
for (const auto &option : options) {
|
for (size_t i = 0; i < options.size(); i++) {
|
||||||
if (option.conflicting && option.get_definition().type != OptionType::Bool) {
|
// InjectHook / EarlyInjectHook accept multiple values, so command line and
|
||||||
|
// spicecfg entries are merged rather than conflicting; don't warn about them
|
||||||
|
if (i == (size_t) launcher::Options::InjectHook ||
|
||||||
|
i == (size_t) launcher::Options::EarlyInjectHook) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const auto &option = options[i];
|
||||||
|
// ignore Boolean values
|
||||||
|
if (option.get_definition().type == OptionType::Bool) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (option.conflicting) {
|
||||||
conflicts += 1;
|
conflicts += 1;
|
||||||
const auto& value = option.get_definition().sensitive ? "*****" : option.value;
|
const auto& value = option.get_definition().sensitive ? "*****" : option.value;
|
||||||
if (launcher::USE_CMD_OVERRIDE) {
|
if (launcher::USE_CMD_OVERRIDE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user