Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding filter-attribute-mods patch; updating patches.
[rsync/rsync-patches.git]
/
xattrs.diff
diff --git
a/xattrs.diff
b/xattrs.diff
index
6ec2f0c
..
4ece1ba
100644
(file)
--- a/
xattrs.diff
+++ b/
xattrs.diff
@@
-10,8
+10,8
@@
To use this patch, run these commands for a successful build:
./configure (optional if already run)
make
./configure (optional if already run)
make
+based-on: patch/acls
diff --git a/compat.c b/compat.c
diff --git a/compat.c b/compat.c
-index 1b66069..fb46fa5 100644
--- a/compat.c
+++ b/compat.c
@@ -189,13 +189,6 @@ void setup_protocol(int f_out,int f_in)
--- a/compat.c
+++ b/compat.c
@@ -189,13 +189,6 @@ void setup_protocol(int f_out,int f_in)
@@
-29,7
+29,6
@@
index 1b66069..fb46fa5 100644
if (delete_mode && !(delete_before+delete_during+delete_after)) {
diff --git a/xattrs.c b/xattrs.c
if (delete_mode && !(delete_before+delete_during+delete_after)) {
diff --git a/xattrs.c b/xattrs.c
-index 2d0e050..b2017ed 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -22,6 +22,7 @@
--- a/xattrs.c
+++ b/xattrs.c
@@ -22,6 +22,7 @@
@@
-48,7
+47,7
@@
index 2d0e050..b2017ed 100644
#define RSYNC_XAL_INITIAL 5
#define RSYNC_XAL_LIST_INITIAL 100
#define RSYNC_XAL_INITIAL 5
#define RSYNC_XAL_LIST_INITIAL 100
-@@ -24
7,7 +249
,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -24
9,7 +251
,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
if (!(ptr = get_xattr_data(fname, name, &datum_len, 0)))
return -1;
if (!(ptr = get_xattr_data(fname, name, &datum_len, 0)))
return -1;
@@
-57,7
+56,7
@@
index 2d0e050..b2017ed 100644
/* For large datums, we store a flag and a checksum. */
name_offset = 1 + MAX_DIGEST_LEN;
sum_init(checksum_seed);
/* For large datums, we store a flag and a checksum. */
name_offset = 1 + MAX_DIGEST_LEN;
sum_init(checksum_seed);
-@@ -3
49,7 +351
,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -3
51,7 +353
,7 @@ static int find_matching_xattr(item_list *xalp)
|| rxas1[j].datum_len != rxas2[j].datum_len
|| strcmp(rxas1[j].name, rxas2[j].name))
break;
|| rxas1[j].datum_len != rxas2[j].datum_len
|| strcmp(rxas1[j].name, rxas2[j].name))
break;
@@
-66,7
+65,7
@@
index 2d0e050..b2017ed 100644
if (memcmp(rxas1[j].datum + 1,
rxas2[j].datum + 1,
MAX_DIGEST_LEN) != 0)
if (memcmp(rxas1[j].datum + 1,
rxas2[j].datum + 1,
MAX_DIGEST_LEN) != 0)
-@@ -38
6,13 +388
,22 @@ int send_xattr(stat_x *sxp, int f)
+@@ -38
8,13 +390
,22 @@ int send_xattr(stat_x *sxp, int f)
{
int ndx = find_matching_xattr(sxp->xattr);
{
int ndx = find_matching_xattr(sxp->xattr);
@@
-92,7
+91,7
@@
index 2d0e050..b2017ed 100644
for (rxa = sxp->xattr->items; count--; rxa++) {
size_t name_len = rxa->name_len;
const char *name = rxa->name;
for (rxa = sxp->xattr->items; count--; rxa++) {
size_t name_len = rxa->name_len;
const char *name = rxa->name;
-@@ -41
1,8 +422
,8 @@ int send_xattr(stat_x *sxp, int f)
+@@ -41
3,8 +424
,8 @@ int send_xattr(stat_x *sxp, int f)
name_len += UPRE_LEN;
}
#endif
name_len += UPRE_LEN;
}
#endif
@@
-103,7
+102,7
@@
index 2d0e050..b2017ed 100644
#ifndef HAVE_LINUX_XATTRS
if (name_len > rxa->name_len) {
write_buf(f, USER_PREFIX, UPRE_LEN);
#ifndef HAVE_LINUX_XATTRS
if (name_len > rxa->name_len) {
write_buf(f, USER_PREFIX, UPRE_LEN);
-@@ -42
0,7 +431
,7 @@ int send_xattr(stat_x *sxp, int f)
+@@ -42
2,7 +433
,7 @@ int send_xattr(stat_x *sxp, int f)
}
#endif
write_buf(f, name, name_len);
}
#endif
write_buf(f, name, name_len);
@@
-112,7
+111,7
@@
index 2d0e050..b2017ed 100644
write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
else
write_buf(f, rxa->datum, rxa->datum_len);
write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
else
write_buf(f, rxa->datum, rxa->datum_len);
-@@ -47
0,7 +481
,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -47
2,7 +483
,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
if (cmp > 0)
same = 0;
cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
if (cmp > 0)
same = 0;
@@
-121,7
+120,7
@@
index 2d0e050..b2017ed 100644
same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
&& memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
MAX_DIGEST_LEN) == 0;
same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
&& memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
MAX_DIGEST_LEN) == 0;
-@@ -51
5,6 +526
,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -51
7,6 +528
,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
int cnt, prior_req = 0;
rsync_xa *rxa;
int cnt, prior_req = 0;
rsync_xa *rxa;
@@
-131,7
+130,7
@@
index 2d0e050..b2017ed 100644
lst += F_XATTR(file);
for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
if (rxa->datum_len <= MAX_FULL_DATUM)
lst += F_XATTR(file);
for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
if (rxa->datum_len <= MAX_FULL_DATUM)
-@@ -57
1,6 +585
,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -57
3,6 +587
,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
rsync_xa *rxa;
int rel_pos, cnt, num, got_xattr_data = 0;
rsync_xa *rxa;
int rel_pos, cnt, num, got_xattr_data = 0;
@@
-141,7
+140,7
@@
index 2d0e050..b2017ed 100644
if (F_XATTR(file) < 0) {
rprintf(FERROR, "recv_xattr_request: internal data error!\n");
exit_cleanup(RERR_STREAMIO);
if (F_XATTR(file) < 0) {
rprintf(FERROR, "recv_xattr_request: internal data error!\n");
exit_cleanup(RERR_STREAMIO);
-@@ -63
3,7 +650
,22 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -63
5,7 +652
,22 @@ void receive_xattr(struct file_struct *file, int f)
#else
int need_sort = 1;
#endif
#else
int need_sort = 1;
#endif
@@
-165,7
+164,7
@@
index 2d0e050..b2017ed 100644
if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
rprintf(FERROR, "receive_xattr: xa index %d out of"
if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
rprintf(FERROR, "receive_xattr: xa index %d out of"
-@@ -64
6,7 +678
,7 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -64
8,7 +680
,7 @@ void receive_xattr(struct file_struct *file, int f)
return;
}
return;
}
@@
-174,7
+173,7
@@
index 2d0e050..b2017ed 100644
(void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
temp_xattr.count = 0;
}
(void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
temp_xattr.count = 0;
}
-@@ -65
4,9 +686
,10 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -65
6,9 +688
,10 @@ void receive_xattr(struct file_struct *file, int f)
for (num = 1; num <= count; num++) {
char *ptr, *name;
rsync_xa *rxa;
for (num = 1; num <= count; num++) {
char *ptr, *name;
rsync_xa *rxa;