mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
gpg: Add new option --debug-iolbf.
* g10/gpg.c (oDebugIOLBF): new. (opts): Add --debug-iolbf. (main): Set option. -- This option is convenient for debugging to make sure that debug output to stderr is synced with output to stdout. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
24a75201da
commit
c581ed717a
@ -2451,6 +2451,11 @@ be given in C syntax (e.g. 0x0042).
|
|||||||
@opindex debug-all
|
@opindex debug-all
|
||||||
Set all useful debugging flags.
|
Set all useful debugging flags.
|
||||||
|
|
||||||
|
@item --debug-iolbf
|
||||||
|
@opindex debug-iolbf
|
||||||
|
Set stdout into line buffered mode. This option is only honored when
|
||||||
|
given on the command line.
|
||||||
|
|
||||||
@item --faked-system-time @var{epoch}
|
@item --faked-system-time @var{epoch}
|
||||||
@opindex faked-system-time
|
@opindex faked-system-time
|
||||||
This option is only useful for testing; it sets the system time back or
|
This option is only useful for testing; it sets the system time back or
|
||||||
|
@ -196,7 +196,7 @@ enum cmd_and_opt_values
|
|||||||
oDebug,
|
oDebug,
|
||||||
oDebugLevel,
|
oDebugLevel,
|
||||||
oDebugAll,
|
oDebugAll,
|
||||||
oDebugCCIDDriver,
|
oDebugIOLBF,
|
||||||
oStatusFD,
|
oStatusFD,
|
||||||
oStatusFile,
|
oStatusFile,
|
||||||
oAttributeFD,
|
oAttributeFD,
|
||||||
@ -557,6 +557,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
ARGPARSE_p_u (oDebug, "debug", "@"),
|
ARGPARSE_p_u (oDebug, "debug", "@"),
|
||||||
ARGPARSE_s_s (oDebugLevel, "debug-level", "@"),
|
ARGPARSE_s_s (oDebugLevel, "debug-level", "@"),
|
||||||
ARGPARSE_s_n (oDebugAll, "debug-all", "@"),
|
ARGPARSE_s_n (oDebugAll, "debug-all", "@"),
|
||||||
|
ARGPARSE_s_n (oDebugIOLBF, "debug-iolbf", "@"),
|
||||||
ARGPARSE_s_i (oStatusFD, "status-fd", "@"),
|
ARGPARSE_s_i (oStatusFD, "status-fd", "@"),
|
||||||
ARGPARSE_s_s (oStatusFile, "status-file", "@"),
|
ARGPARSE_s_s (oStatusFile, "status-file", "@"),
|
||||||
ARGPARSE_s_i (oAttributeFD, "attribute-fd", "@"),
|
ARGPARSE_s_i (oAttributeFD, "attribute-fd", "@"),
|
||||||
@ -2158,6 +2159,8 @@ main (int argc, char **argv)
|
|||||||
while( arg_parse( &pargs, opts) ) {
|
while( arg_parse( &pargs, opts) ) {
|
||||||
if( pargs.r_opt == oDebug || pargs.r_opt == oDebugAll )
|
if( pargs.r_opt == oDebug || pargs.r_opt == oDebugAll )
|
||||||
parse_debug++;
|
parse_debug++;
|
||||||
|
else if (pargs.r_opt == oDebugIOLBF)
|
||||||
|
es_setvbuf (es_stdout, NULL, _IOLBF, 0);
|
||||||
else if( pargs.r_opt == oOptions ) {
|
else if( pargs.r_opt == oOptions ) {
|
||||||
/* yes there is one, so we do not try the default one, but
|
/* yes there is one, so we do not try the default one, but
|
||||||
* read the option file when it is encountered at the commandline
|
* read the option file when it is encountered at the commandline
|
||||||
@ -2419,6 +2422,8 @@ main (int argc, char **argv)
|
|||||||
case oDebugAll: opt.debug = ~0; break;
|
case oDebugAll: opt.debug = ~0; break;
|
||||||
case oDebugLevel: debug_level = pargs.r.ret_str; break;
|
case oDebugLevel: debug_level = pargs.r.ret_str; break;
|
||||||
|
|
||||||
|
case oDebugIOLBF: break; /* Already set in pre-parse step. */
|
||||||
|
|
||||||
case oStatusFD:
|
case oStatusFD:
|
||||||
set_status_fd ( translate_sys2libc_fd_int (pargs.r.ret_int, 1) );
|
set_status_fd ( translate_sys2libc_fd_int (pargs.r.ret_int, 1) );
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user