mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
menuselect: exit non-zero in case of failure on --enable|disable options.
ASTERISK-29348 Change-Id: I77e3466435f5a51a57538b29addb68d811af238d Signed-off-by: Jaco Kroon <jaco@uls.co.za>
This commit is contained in:
committed by
George Joseph
parent
2e7fc84398
commit
f47c5cbdf9
@@ -2120,6 +2120,7 @@ int main(int argc, char *argv[])
|
||||
/* Reset options processing */
|
||||
option_index = 0;
|
||||
optind = 1;
|
||||
res = 0;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "", long_options, &option_index)) != -1) {
|
||||
print_debug("Got option %c\n", c);
|
||||
@@ -2130,6 +2131,7 @@ int main(int argc, char *argv[])
|
||||
set_member_enabled(mem);
|
||||
} else {
|
||||
fprintf(stderr, "'%s' not found\n", optarg);
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2139,6 +2141,7 @@ int main(int argc, char *argv[])
|
||||
set_all(cat, 1);
|
||||
} else {
|
||||
fprintf(stderr, "'%s' not found\n", optarg);
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2153,6 +2156,7 @@ int main(int argc, char *argv[])
|
||||
clear_member_enabled(mem);
|
||||
} else {
|
||||
fprintf(stderr, "'%s' not found\n", optarg);
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2162,6 +2166,7 @@ int main(int argc, char *argv[])
|
||||
set_all(cat, 0);
|
||||
} else {
|
||||
fprintf(stderr, "'%s' not found\n", optarg);
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2176,7 +2181,6 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
}
|
||||
res = 0;
|
||||
}
|
||||
|
||||
if (!res) {
|
||||
|
Reference in New Issue
Block a user