The Samba-Bugzilla – Attachment 11225 Details for
Bug 11378
Please add a '--line-buffered' option to rsync to make logging/output more friendly with pipes/syslog/CI systems/etc.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to implement --line-buffered option
line-buffered.diff (text/plain), 2.14 KB, created by
Nathan Neulinger
on 2015-07-02 18:00:19 UTC
(
hide
)
Description:
patch to implement --line-buffered option
Filename:
MIME Type:
Creator:
Nathan Neulinger
Created:
2015-07-02 18:00:19 UTC
Size:
2.14 KB
patch
obsolete
>diff --git a/options.c b/options.c >index 4128b59..77c7132 100644 >--- a/options.c >+++ b/options.c >@@ -293,6 +293,7 @@ static struct output_struct debug_words[COUNT_DEBUG+1] = { > static int verbose = 0; > static int do_stats = 0; > static int do_progress = 0; >+int do_line_buffered = 0; > static int daemon_opt; /* sets am_daemon after option error-reporting */ > static int omit_dir_times = 0; > static int omit_link_times = 0; >@@ -786,6 +787,7 @@ void usage(enum logcode F) > rprintf(F," -h, --human-readable output numbers in a human-readable format\n"); > rprintf(F," --progress show progress during transfer\n"); > rprintf(F," -P same as --partial --progress\n"); >+ rprintf(F," --line-buffered output single line progress messages suitable for pipes\n"); > rprintf(F," -i, --itemize-changes output a change-summary for all updates\n"); > rprintf(F," --out-format=FORMAT output updates using the specified FORMAT\n"); > rprintf(F," --log-file=FILE log what we're doing to the specified FILE\n"); >@@ -976,6 +978,8 @@ static struct poptOption long_options[] = { > {0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 }, > {"progress", 0, POPT_ARG_VAL, &do_progress, 1, 0, 0 }, > {"no-progress", 0, POPT_ARG_VAL, &do_progress, 0, 0, 0 }, >+ {"line-buffered", 0, POPT_ARG_VAL, &do_line_buffered, 1, 0, 0 }, >+ {"no-line-buffered", 0, POPT_ARG_VAL, &do_line_buffered, 0, 0, 0 }, > {"partial", 0, POPT_ARG_VAL, &keep_partial, 1, 0, 0 }, > {"no-partial", 0, POPT_ARG_VAL, &keep_partial, 0, 0, 0 }, > {"partial-dir", 0, POPT_ARG_STRING, &partial_dir, 0, 0, 0 }, >diff --git a/progress.c b/progress.c >index 318a77f..0587d3c 100644 >--- a/progress.c >+++ b/progress.c >@@ -24,6 +24,7 @@ > #include "inums.h" > > extern int am_server; >+extern int do_line_buffered; > extern int flist_eof; > extern int need_unsorted_flist; > extern int output_needs_newline; >@@ -217,5 +218,5 @@ void show_progress(OFF_T ofs, OFF_T size) > return; > #endif > >- rprint_progress(ofs, size, &now, False); >+ rprint_progress(ofs, size, &now, False || do_line_buffered); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11378
: 11225