forked from Mirrors/sngrep
Improve disabled command line options error messages #120
When using a command line option that must be enabled using configure flags, display an error message to give a hint that the given options is not enabled.
This commit is contained in:
parent
44b33f3ced
commit
805152b619
15
src/main.c
15
src/main.c
|
@ -193,10 +193,13 @@ main(int argc, char* argv[])
|
|||
return 0;
|
||||
}
|
||||
break;
|
||||
#if defined(WITH_GNUTLS) || defined(WITH_OPENSSL)
|
||||
case 'k':
|
||||
#if defined(WITH_GNUTLS) || defined(WITH_OPENSSL)
|
||||
keyfile = optarg;
|
||||
break;
|
||||
#else
|
||||
fprintf(stderr, "sngrep is not compiled with SSL support.");
|
||||
exit(1);
|
||||
#endif
|
||||
case 'c':
|
||||
only_calls = 1;
|
||||
|
@ -228,13 +231,21 @@ main(int argc, char* argv[])
|
|||
case 't':
|
||||
case 'W':
|
||||
break;
|
||||
#ifdef USE_EEP
|
||||
case 'L':
|
||||
#ifdef USE_EEP
|
||||
capture_eep_set_server_url(optarg);
|
||||
break;
|
||||
#else
|
||||
fprintf(stderr, "sngrep is not compiled with HEP/EEP support.");
|
||||
exit(1);
|
||||
#endif
|
||||
case 'H':
|
||||
#ifdef USE_EEP
|
||||
capture_eep_set_client_url(optarg);
|
||||
break;
|
||||
#else
|
||||
fprintf(stderr, "sngrep is not compiled with HEP/EEP support.");
|
||||
exit(1);
|
||||
#endif
|
||||
case '?':
|
||||
if (strchr(options, optopt)) {
|
||||
|
|
Loading…
Reference in New Issue