version 1.29, 2019/02/18 21:55:27 |
version 1.30, 2019/02/18 22:47:34 |
|
|
|
|
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) |
|
|
|
|
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; |