[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.29 and 1.30

version 1.29, 2019/02/18 21:55:27 version 1.30, 2019/02/18 22:47:34
Line 138 
Line 138 
   
         if (f->host != NULL) {          if (f->host != NULL) {
                 if (strncasecmp(f->host, "rsync://", 8) == 0) {                  if (strncasecmp(f->host, "rsync://", 8) == 0) {
                         /* rsync://host/module[/path] */                          /* rsync://host[:port]/module[/path] */
                         f->remote = 1;                          f->remote = 1;
                         len = strlen(f->host) - 8 + 1;                          len = strlen(f->host) - 8 + 1;
                         memmove(f->host, f->host + 8, len);                          memmove(f->host, f->host + 8, len);
                         if ((cp = strchr(f->host, '/')) == NULL)                          if ((cp = strchr(f->host, '/')) == NULL)
                                 errx(1, "rsync protocol "                                  errx(1, "rsync protocol requires a module "
                                         "requires a module name");                                      "name");
                         *cp++ = '\0';                          *cp++ = '\0';
                         f->module = cp;                          f->module = cp;
                         if ((cp = strchr(f->module, '/')) != NULL)                          if ((cp = strchr(f->module, '/')) != NULL)
Line 333 
Line 333 
   
         memset(&opts, 0, sizeof(struct opts));          memset(&opts, 0, sizeof(struct opts));
   
         while ((c = getopt_long(argc, argv, "Dae:ghlnoprtv", lopts, NULL)) != -1) {          while ((c = getopt_long(argc, argv, "Dae:ghlnoprtv", lopts, NULL))
               != -1) {
                 switch (c) {                  switch (c) {
                 case 'D':                  case 'D':
                         opts.devices = 1;                          opts.devices = 1;

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30