Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b54d5ec
)
Fixed the value of CENT_POS for non-Linux systems.
author
Wayne Davison
<wayned@samba.org>
Sat, 4 Nov 2006 07:36:03 +0000
(07:36 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 4 Nov 2006 07:36:03 +0000
(07:36 +0000)
fake-super.diff
patch
|
blob
|
blame
|
history
diff --git
a/fake-super.diff
b/fake-super.diff
index
0766699
..
cebe34a
100644
(file)
--- a/
fake-super.diff
+++ b/
fake-super.diff
@@
-434,7
+434,7
@@
above:
int preserve_perms = 0;
--- old/xattr.c
+++ new/xattr.c
int preserve_perms = 0;
--- old/xattr.c
+++ new/xattr.c
-@@ -39,13 +39,2
3
@@ extern unsigned int file_struct_len;
+@@ -39,13 +39,2
4
@@ extern unsigned int file_struct_len;
#define SYSTEM_PREFIX "system."
#define SPRE_LEN ((int)sizeof SYSTEM_PREFIX - 1)
#define SYSTEM_PREFIX "system."
#define SPRE_LEN ((int)sizeof SYSTEM_PREFIX - 1)
@@
-446,20
+446,21
@@
above:
+#define FAKE_PREFIX USER_PREFIX RSYNC_PREFIX
+#define FPRE_LEN ((int)sizeof FAKE_PREFIX - 1)
+#define XSTAT_ATTR USER_PREFIX RSYNC_PREFIX XSTAT_SUFFIX
+#define FAKE_PREFIX USER_PREFIX RSYNC_PREFIX
+#define FPRE_LEN ((int)sizeof FAKE_PREFIX - 1)
+#define XSTAT_ATTR USER_PREFIX RSYNC_PREFIX XSTAT_SUFFIX
++#define CENT_POS (UPRE_LEN + (int)sizeof RSYNC_PREFIX - 1)
#else
-#define RSYNC_PREFIX "rsync."
#define RPRE_LEN ((int)sizeof RSYNC_PREFIX - 1)
+#define FPRE_LEN 0
+#define XSTAT_ATTR RSYNC_PREFIX XSTAT_SUFFIX
#else
-#define RSYNC_PREFIX "rsync."
#define RPRE_LEN ((int)sizeof RSYNC_PREFIX - 1)
+#define FPRE_LEN 0
+#define XSTAT_ATTR RSYNC_PREFIX XSTAT_SUFFIX
++#define CENT_POS RPRE_LEN
#endif
+#define XSTAT_LEN ((int)sizeof XSTAT_ATTR - 1)
#endif
+#define XSTAT_LEN ((int)sizeof XSTAT_ATTR - 1)
-+#define CENT_POS (UPRE_LEN + (int)sizeof RSYNC_PREFIX - 1)
+
typedef struct {
char *datum, *name;
size_t datum_len, name_len;
+
typedef struct {
char *datum, *name;
size_t datum_len, name_len;
-@@ -143,6 +15
3
,10 @@ static int rsync_xal_get(const char *fna
+@@ -143,6 +15
4
,10 @@ static int rsync_xal_get(const char *fna
continue;
#endif
continue;
#endif
@@
-470,7
+471,7
@@
above:
datum_len = sys_lgetxattr(fname, name, NULL, 0);
if (datum_len < 0) {
if (errno == ENOTSUP)
datum_len = sys_lgetxattr(fname, name, NULL, 0);
if (datum_len < 0) {
if (errno == ENOTSUP)
-@@ -173,6 +18
7
,13 @@ static int rsync_xal_get(const char *fna
+@@ -173,6 +18
8
,13 @@ static int rsync_xal_get(const char *fna
return -1;
}
}
return -1;
}
}
@@
-483,8
+484,8
@@
above:
+#endif
rxas = EXPAND_ITEM_LIST(xalp, rsync_xa, RSYNC_XAL_INITIAL);
rxas->name = ptr + datum_len;
+#endif
rxas = EXPAND_ITEM_LIST(xalp, rsync_xa, RSYNC_XAL_INITIAL);
rxas->name = ptr + datum_len;
-
memcpy(rxas->name, name, name_len)
;
-@@ -293,20 +31
4
,23 @@ void receive_xattr(struct file_struct *f
+
rxas->datum = ptr
;
+@@ -293,20 +31
5
,23 @@ void receive_xattr(struct file_struct *f
rsync_xa *rxa;
size_t name_len = read_int(f);
size_t datum_len = read_int(f);
rsync_xa *rxa;
size_t name_len = read_int(f);
size_t datum_len = read_int(f);
@@
-513,7
+514,7
@@
above:
if (!am_root && strncmp(name, USER_PREFIX, UPRE_LEN) != 0) {
free(ptr);
continue;
if (!am_root && strncmp(name, USER_PREFIX, UPRE_LEN) != 0) {
free(ptr);
continue;
-@@ -32
3,6 +347
,11 @@ void receive_xattr(struct file_struct *f
+@@ -32
4,6 +349
,11 @@ void receive_xattr(struct file_struct *f
memcpy(name, RSYNC_PREFIX, RPRE_LEN);
}
#endif
memcpy(name, RSYNC_PREFIX, RPRE_LEN);
}
#endif
@@
-524,8
+525,8
@@
above:
+ }
rxa = EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
rxa->name = name;
+ }
rxa = EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
rxa->name = name;
- rxa->
name_len = name_len
;
-@@ -403,4 +43
2
,146 @@ int set_xattr(const char *fname, const s
+ rxa->
datum = ptr
;
+@@ -403,4 +43
3
,146 @@ int set_xattr(const char *fname, const s
return rsync_xal_set(fname, lst + ndx); /* TODO: This needs to return 1 if no xattrs changed! */
}
return rsync_xal_set(fname, lst + ndx); /* TODO: This needs to return 1 if no xattrs changed! */
}