version 1.61, 2021/10/28 13:07:43 |
version 1.62, 2021/10/29 08:00:59 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
#include <util.h> |
|
|
#include "extern.h" |
#include "extern.h" |
|
|
|
|
pid_t child; |
pid_t child; |
int fds[2], sd = -1, rc, c, st, i, lidx; |
int fds[2], sd = -1, rc, c, st, i, lidx; |
size_t basedir_cnt = 0; |
size_t basedir_cnt = 0; |
struct sess sess; |
struct sess sess; |
struct fargs *fargs; |
struct fargs *fargs; |
char **args; |
char **args; |
const char *errstr; |
const char *errstr; |
|
|
NULL) == -1) |
NULL) == -1) |
err(ERR_IPC, "pledge"); |
err(ERR_IPC, "pledge"); |
|
|
|
opts.max_size = opts.min_size = -1; |
|
|
while ((c = getopt_long(argc, argv, "Dae:ghlnoprtvxz", lopts, &lidx)) |
while ((c = getopt_long(argc, argv, "Dae:ghlnoprtvxz", lopts, &lidx)) |
!= -1) { |
!= -1) { |
switch (c) { |
switch (c) { |
|
|
opts.basedir[basedir_cnt++] = optarg; |
opts.basedir[basedir_cnt++] = optarg; |
break; |
break; |
case OP_MAX_SIZE: |
case OP_MAX_SIZE: |
|
if (scan_scaled(optarg, &opts.max_size) == -1) |
|
err(1, "bad max-size"); |
|
break; |
case OP_MIN_SIZE: |
case OP_MIN_SIZE: |
/* for now simply ignore */ |
if (scan_scaled(optarg, &opts.min_size) == -1) |
|
err(1, "bad min-size"); |
break; |
break; |
case OP_VERSION: |
case OP_VERSION: |
fprintf(stderr, "openrsync: protocol version %u\n", |
fprintf(stderr, "openrsync: protocol version %u\n", |