Skip to content

Commit 3e03da5

Browse files
committed
Complain about unknown options again.
1 parent dd7eefd commit 3e03da5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dmiopt.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int parse_opt_string(const char *arg)
217217
int parse_command_line(int argc, char * const argv[])
218218
{
219219
int option;
220-
const char *optstring = ":d:hqs:t:uV";
220+
const char *optstring = "d:hqs:t:uV";
221221
struct option longopts[]={
222222
{ "dev-mem", required_argument, NULL, 'd' },
223223
{ "help", no_argument, NULL, 'h' },
@@ -257,7 +257,7 @@ int parse_command_line(int argc, char * const argv[])
257257
case 'V':
258258
opt.flags|=FLAG_VERSION;
259259
break;
260-
case ':':
260+
case '?':
261261
switch(optopt)
262262
{
263263
case 's':
@@ -269,8 +269,6 @@ int parse_command_line(int argc, char * const argv[])
269269
print_opt_type_list();
270270
break;
271271
}
272-
/* fall through */
273-
case '?':
274272
return -1;
275273
}
276274

0 commit comments

Comments
 (0)