Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edad589
)
Set a new variable, bwlimit_writemax, based on the value of the bwlimit
author
Wayne Davison
<wayned@samba.org>
Thu, 27 May 2004 21:51:53 +0000
(21:51 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 27 May 2004 21:51:53 +0000
(21:51 +0000)
option.
options.c
patch
|
blob
|
blame
|
history
diff --git
a/options.c
b/options.c
index
ecd8ac3
..
69eac5c
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-83,6
+83,7
@@
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int bwlimit = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int bwlimit = 0;
+size_t bwlimit_writemax = 0;
int delete_after = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
int delete_after = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
@@
-728,6
+729,12
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
if (do_progress && !verbose)
verbose = 1;
if (do_progress && !verbose)
verbose = 1;
+ if (bwlimit) {
+ bwlimit_writemax = (size_t)bwlimit * 128;
+ if (bwlimit_writemax < 512)
+ bwlimit_writemax = 512;
+ }
+
if (files_from) {
char *colon;
if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {
if (files_from) {
char *colon;
if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {