version 1.67, 2023/04/27 16:28:18 |
version 1.68, 2023/04/28 10:24:38 |
|
|
{ "group", no_argument, &opts.preserve_gids, 1 }, |
{ "group", no_argument, &opts.preserve_gids, 1 }, |
{ "no-group", no_argument, &opts.preserve_gids, 0 }, |
{ "no-group", no_argument, &opts.preserve_gids, 0 }, |
{ "help", no_argument, NULL, 'h' }, |
{ "help", no_argument, NULL, 'h' }, |
|
{ "ignore-times", no_argument, NULL, 'I' }, |
{ "include", required_argument, NULL, OP_INCLUDE }, |
{ "include", required_argument, NULL, OP_INCLUDE }, |
{ "include-from", required_argument, NULL, OP_INCLUDE_FROM }, |
{ "include-from", required_argument, NULL, OP_INCLUDE_FROM }, |
{ "links", no_argument, &opts.preserve_links, 1 }, |
{ "links", no_argument, &opts.preserve_links, 1 }, |
|
|
{ "rsync-path", required_argument, NULL, OP_RSYNCPATH }, |
{ "rsync-path", required_argument, NULL, OP_RSYNCPATH }, |
{ "sender", no_argument, &opts.sender, 1 }, |
{ "sender", no_argument, &opts.sender, 1 }, |
{ "server", no_argument, &opts.server, 1 }, |
{ "server", no_argument, &opts.server, 1 }, |
|
{ "size-only", no_argument, &opts.size_only, 1 }, |
{ "specials", no_argument, &opts.specials, 1 }, |
{ "specials", no_argument, &opts.specials, 1 }, |
{ "no-specials", no_argument, &opts.specials, 0 }, |
{ "no-specials", no_argument, &opts.specials, 0 }, |
{ "timeout", required_argument, NULL, OP_TIMEOUT }, |
{ "timeout", required_argument, NULL, OP_TIMEOUT }, |
|
|
|
|
opts.max_size = opts.min_size = -1; |
opts.max_size = opts.min_size = -1; |
|
|
while ((c = getopt_long(argc, argv, "aDe:ghlnoprtVvxz", lopts, &lidx)) |
while ((c = getopt_long(argc, argv, "aDe:ghIlnoprtVvxz", lopts, &lidx)) |
!= -1) { |
!= -1) { |
switch (c) { |
switch (c) { |
case 'D': |
case 'D': |
|
|
case 'g': |
case 'g': |
opts.preserve_gids = 1; |
opts.preserve_gids = 1; |
break; |
break; |
|
case 'I': |
|
opts.ignore_times = 1; |
|
break; |
case 'l': |
case 'l': |
opts.preserve_links = 1; |
opts.preserve_links = 1; |
break; |
break; |
|
|
exit(rc); |
exit(rc); |
usage: |
usage: |
fprintf(stderr, "usage: %s" |
fprintf(stderr, "usage: %s" |
" [-aDglnoprtVvx] [-e program] [--address=sourceaddr]\n" |
" [-aDgIlnoprtVvx] [-e program] [--address=sourceaddr]\n" |
"\t[--contimeout=seconds] [--compare-dest=dir] [--del] [--exclude]\n" |
"\t[--contimeout=seconds] [--compare-dest=dir] [--del] [--exclude]\n" |
"\t[--exclude-from=file] [--include] [--include-from=file]\n" |
"\t[--exclude-from=file] [--include] [--include-from=file]\n" |
"\t[--no-motd] [--numeric-ids] [--port=portnumber]\n" |
"\t[--no-motd] [--numeric-ids] [--port=portnumber]\n" |
"\t[--rsync-path=program] [--timeout=seconds]\n" |
"\t[--rsync-path=program] [--size-only] [--timeout=seconds]\n" |
"\tsource ... directory\n", |
"\tsource ... directory\n", |
getprogname()); |
getprogname()); |
exit(ERR_SYNTAX); |
exit(ERR_SYNTAX); |