=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/extern.h,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -u -r1.41 -r1.41.2.1 --- src/usr.bin/rsync/extern.h 2021/09/01 09:48:08 1.41 +++ src/usr.bin/rsync/extern.h 2021/11/09 13:40:41 1.41.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.41 2021/09/01 09:48:08 claudio Exp $ */ +/* $OpenBSD: extern.h,v 1.41.2.1 2021/11/09 13:40:41 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -34,6 +34,15 @@ #define BLOCK_SIZE_MIN (700) /* + * Maximum number of base directories that can be used. + */ +#define MAX_BASEDIR 20 + +#define BASE_MODE_COMPARE 1 +#define BASE_MODE_COPY 2 +#define BASE_MODE_LINK 3 + +/* * The sender and receiver use a two-phase synchronisation process. * The first uses two-byte hashes; the second, 16-byte. * (The second must hold a full MD4 digest.) @@ -131,10 +140,14 @@ int no_motd; /* --no-motd */ int numeric_ids; /* --numeric-ids */ int one_file_system; /* -x */ + int alt_base_mode; + off_t max_size; /* --max-size */ + off_t min_size; /* --min-size */ char *rsync_path; /* --rsync-path */ char *ssh_prog; /* --rsh or -e */ char *port; /* --port */ char *address; /* --address */ + char *basedir[MAX_BASEDIR]; }; enum rule_type { @@ -298,7 +311,8 @@ int flist_gen_dels(struct sess *, const char *, struct flist **, size_t *, const struct flist *, size_t); -char **fargs_cmdline(struct sess *, const struct fargs *, size_t *); +const char *alt_base_mode(int); +char **fargs_cmdline(struct sess *, const struct fargs *, size_t *); int io_read_buf(struct sess *, int, void *, size_t); int io_read_byte(struct sess *, int, uint8_t *); @@ -367,6 +381,8 @@ const struct sess *); void hash_file(const void *, size_t, unsigned char *, const struct sess *); + +void copy_file(int, const char *, const struct flist *); int mkpath(char *);