[BACK]Return to main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/main.c between version 1.44 and 1.45

version 1.44, 2019/04/04 04:19:54 version 1.45, 2019/05/08 20:00:25
Line 29 
Line 29 
   
 #include "extern.h"  #include "extern.h"
   
   int verbose;
   
 /*  /*
  * A remote host is has a colon before the first path separator.   * A remote host is has a colon before the first path separator.
  * This works for rsh remote hosts (host:/foo/bar), implicit rsync   * This works for rsh remote hosts (host:/foo/bar), implicit rsync
Line 303 
Line 305 
                 { "no-specials", no_argument,   &opts.specials,         0 },                  { "no-specials", no_argument,   &opts.specials,         0 },
                 { "times",      no_argument,    &opts.preserve_times,   1 },                  { "times",      no_argument,    &opts.preserve_times,   1 },
                 { "no-times",   no_argument,    &opts.preserve_times,   0 },                  { "no-times",   no_argument,    &opts.preserve_times,   0 },
                 { "verbose",    no_argument,    &opts.verbose,          1 },                  { "verbose",    no_argument,    &verbose,               1 },
                 { "no-verbose", no_argument,    &opts.verbose,          0 },                  { "no-verbose", no_argument,    &verbose,               0 },
                 { NULL,         0,              NULL,                   0 }};                  { NULL,         0,              NULL,                   0 }};
   
         /* Global pledge. */          /* Global pledge. */
Line 357 
Line 359 
                         opts.preserve_times = 1;                          opts.preserve_times = 1;
                         break;                          break;
                 case 'v':                  case 'v':
                         opts.verbose++;                          verbose++;
                         break;                          break;
                 case 'x':                  case 'x':
                         opts.one_file_system++;                          opts.one_file_system++;
Line 454 
Line 456 
                 sess.opts = &opts;                  sess.opts = &opts;
   
                 if ((args = fargs_cmdline(&sess, fargs, NULL)) == NULL) {                  if ((args = fargs_cmdline(&sess, fargs, NULL)) == NULL) {
                         ERRX1(&sess, "fargs_cmdline");                          ERRX1("fargs_cmdline");
                         _exit(1);                          _exit(1);
                 }                  }
   
                 for (i = 0; args[i] != NULL; i++)                  for (i = 0; args[i] != NULL; i++)
                         LOG2(&sess, "exec[%d] = %s", i, args[i]);                          LOG2("exec[%d] = %s", i, args[i]);
   
                 /* Make sure the child's stdin is from the sender. */                  /* Make sure the child's stdin is from the sender. */
                 if (dup2(fds[1], STDIN_FILENO) == -1) {                  if (dup2(fds[1], STDIN_FILENO) == -1) {
                         ERR(&sess, "dup2");                          ERR("dup2");
                         _exit(1);                          _exit(1);
                 }                  }
                 if (dup2(fds[1], STDOUT_FILENO) == -1) {                  if (dup2(fds[1], STDOUT_FILENO) == -1) {
                         ERR(&sess, "dup2");                          ERR("dup2");
                         _exit(1);                          _exit(1);
                 }                  }
                 execvp(args[0], args);                  execvp(args[0], args);

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45