summaryrefslogtreecommitdiff
path: root/compat.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-04-07 17:22:25 +0000
committerWayne Davison <wayned@samba.org>2007-04-07 17:22:25 +0000
commit16edf86595a5a990a942fa045dfb523dae1fe6cb (patch)
tree259b6420baad22345ce1a24c269dd582bb0e9a10 /compat.c
parent1c53e5171cfce78416c0a534dbe8fb2d0725fd2e (diff)
downloadrsync-16edf86595a5a990a942fa045dfb523dae1fe6cb.tar.gz
rsync-16edf86595a5a990a942fa045dfb523dae1fe6cb.tar.bz2
rsync-16edf86595a5a990a942fa045dfb523dae1fe6cb.zip
The improved --xattrs option is landing on the trunk.
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/compat.c b/compat.c
index a71e45e4..3f4bd45c 100644
--- a/compat.c
+++ b/compat.c
@@ -43,6 +43,7 @@ extern int protocol_version;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_acls;
+extern int preserve_xattrs;
extern int preserve_hard_links;
extern int need_messages_from_generator;
extern int delete_mode, delete_before, delete_during, delete_after;
@@ -65,6 +66,8 @@ void setup_protocol(int f_out,int f_in)
preserve_gid = ++file_extra_cnt;
if (preserve_acls && !am_sender)
preserve_acls = ++file_extra_cnt;
+ if (preserve_xattrs)
+ preserve_xattrs = ++file_extra_cnt;
if (remote_protocol == 0) {
if (!read_batch)
@@ -119,6 +122,13 @@ void setup_protocol(int f_out,int f_in)
protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
+ if (preserve_xattrs) {
+ rprintf(FERROR,
+ "--xattrs requires protocol 30 or higher"
+ " (negotiated %d).\n",
+ protocol_version);
+ exit_cleanup(RERR_PROTOCOL);
+ }
}
if (delete_mode && !(delete_before+delete_during+delete_after)) {