mirror of
https://github.com/curl/curl.git
synced 2026-07-29 21:28:07 +03:00
- Added warning outputs if the command line uses more than one of the options
-v, --trace and --trace-ascii, since it could really confuse the user. Clarified this fact in the man page.
This commit is contained in:
parent
8b5295d003
commit
e37973913d
3 changed files with 21 additions and 1 deletions
|
|
@ -1650,10 +1650,15 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
#endif
|
||||
case 'g': /* --trace */
|
||||
GetStr(&config->trace_dump, nextarg);
|
||||
if(config->tracetype && (config->tracetype != TRACE_BIN))
|
||||
warnf(config, "--trace overrides an earlier trace/verbose option\n");
|
||||
config->tracetype = TRACE_BIN;
|
||||
break;
|
||||
case 'h': /* --trace-ascii */
|
||||
GetStr(&config->trace_dump, nextarg);
|
||||
if(config->tracetype && (config->tracetype != TRACE_ASCII))
|
||||
warnf(config,
|
||||
"--trace-ascii overrides an earlier trace/verbose option\n");
|
||||
config->tracetype = TRACE_ASCII;
|
||||
break;
|
||||
case 'i': /* --limit-rate */
|
||||
|
|
@ -2398,6 +2403,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
case 'v':
|
||||
/* the '%' thing here will cause the trace get sent to stderr */
|
||||
GetStr(&config->trace_dump, (char *)"%");
|
||||
if(config->tracetype && (config->tracetype != TRACE_PLAIN))
|
||||
warnf(config,
|
||||
"-v/--verbose overrides an earlier trace/verbose option\n");
|
||||
config->tracetype = TRACE_PLAIN;
|
||||
break;
|
||||
case 'V':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue