Updated patches to work with the current trunk.
[rsync/rsync-patches.git] / slow-down.diff
index 6c0236a..de149d0 100644 (file)
@@ -14,11 +14,11 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -71,6 +71,7 @@ extern int sender_symlink_iconv;
+@@ -70,6 +70,7 @@ extern int sender_symlink_iconv;
  extern int output_needs_newline;
  extern int sender_keeps_checksum;
  extern int unsort_ndx;
@@ -26,7 +26,7 @@ diff --git a/flist.c b/flist.c
  extern struct stats stats;
  extern char *filesfrom_host;
  extern char *usermap, *groupmap;
-@@ -1753,6 +1754,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1752,6 +1753,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
                }
  
                send_file_name(f, flist, fbuf, NULL, flags, filter_level);
@@ -50,7 +50,7 @@ diff --git a/options.c b/options.c
 @@ -776,6 +777,7 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
-   rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
+   rprintf(F,"     --bwlimit=RATE          limit socket I/O bandwidth\n");
 +  rprintf(F,"     --slow-down=USECs       sleep N usec while creating the filelist\n");
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");
@@ -60,6 +60,6 @@ diff --git a/options.c b/options.c
    {"no-itemize-changes",0, POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
    {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
 +  {"slow-down",        0,  POPT_ARG_LONG,   &sleep_asec, 0, 0, 0 },
-   {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
+   {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },