Commit 94ab6a31 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#6038 revert prev commits, ITS rejected

parent c8cf2fc4
...@@ -214,7 +214,7 @@ text_open (void ** display_datap) ...@@ -214,7 +214,7 @@ text_open (void ** display_datap)
data->buffer_length = default_buffer_length; data->buffer_length = default_buffer_length;
data->buffer = calloc( 1, default_buffer_length ); data->buffer = calloc( 1, default_buffer_length );
assert( data->buffer != NULL ); assert( data->buffer != NULL );
data->output = stdout; data->output = stderr;
*display_datap = data; *display_datap = data;
return 0; return 0;
} }
...@@ -314,7 +314,6 @@ text_update ( ...@@ -314,7 +314,6 @@ text_update (
(void) fprintf( data->output, (void) fprintf( data->output,
"\r%-79s", "\r%-79s",
data->buffer ); data->buffer );
(void) fflush( data->output );
data->need_eol = 1; data->need_eol = 1;
return 0; return 0;
} }
......
...@@ -76,7 +76,7 @@ slapadd( int argc, char **argv ) ...@@ -76,7 +76,7 @@ slapadd( int argc, char **argv )
/* default "000" */ /* default "000" */
csnsid = 0; csnsid = 0;
if ( isatty (1) ) enable_meter = 1; if ( isatty (2) ) enable_meter = 1;
slap_tool_init( progname, SLAPADD, argc, argv ); slap_tool_init( progname, SLAPADD, argc, argv );
memset( &opbuf, 0, sizeof(opbuf) ); memset( &opbuf, 0, sizeof(opbuf) );
...@@ -506,7 +506,7 @@ slapadd( int argc, char **argv ) ...@@ -506,7 +506,7 @@ slapadd( int argc, char **argv )
if ( !dryrun ) { if ( !dryrun ) {
if ( enable_meter ) { if ( enable_meter ) {
fprintf( stdout, "Closing DB..." ); fprintf( stderr, "Closing DB..." );
} }
if( be->be_entry_close( be ) ) { if( be->be_entry_close( be ) ) {
rc = EXIT_FAILURE; rc = EXIT_FAILURE;
...@@ -516,7 +516,7 @@ slapadd( int argc, char **argv ) ...@@ -516,7 +516,7 @@ slapadd( int argc, char **argv )
be->be_sync( be ); be->be_sync( be );
} }
if ( enable_meter ) { if ( enable_meter ) {
fprintf( stdout, "\n" ); fprintf( stderr, "\n" );
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment