}
-void print_child_argv(char **cmd)
+static void print_child_argv(char **cmd)
{
- rprintf(FINFO, RSYNC_NAME ": open connection using ");
+ rprintf(FINFO, "opening connection using ");
for (; *cmd; cmd++) {
/* Look for characters that ought to be quoted. This
* is not a great quoting algorithm, but it's
-int set_modtime(char *fname,time_t modtime)
+int set_modtime(char *fname, time_t modtime)
{
extern int dry_run;
- if (dry_run) return 0;
+ if (dry_run)
+ return 0;
+
+ if (verbose > 2) {
+ rprintf(FINFO, "set modtime of %s to (%ld) %s",
+ fname, (long) modtime,
+ asctime(localtime(&modtime)));
+ }
+
{
#ifdef HAVE_UTIMBUF
struct utimbuf tbuf;
unsigned long diff = msdiff(&start_time, now);
double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0;
const char *units;
- double remain = rate ? (double) (size-ofs) / rate / 1000.0: 0.0;
+ /* If we've finished transferring this file, show the time taken;
+ * otherwise show expected time to complete. That's kind of
+ * inconsistent, but people can probably cope. Hopefully we'll
+ * get more consistent and complete progress reporting soon. --
+ * mbp */
+ double remain = is_last
+ ? (double) diff / 1000.0
+ : rate ? (double) (size-ofs) / rate / 1000.0 : 0.0;
int remain_h, remain_m, remain_s;
if (rate > 1024*1024) {