Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
13710874
Commit
13710874
authored
Sep 23, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed "statx" to "stat_x" to try to work around a build problem on AIX.
parent
7341ee2d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
31 deletions
+31
-31
acls.c
acls.c
+8
-8
backup.c
backup.c
+2
-2
flist.c
flist.c
+1
-1
generator.c
generator.c
+5
-5
hlink.c
hlink.c
+4
-4
rsync.c
rsync.c
+2
-2
rsync.h
rsync.h
+1
-1
xattrs.c
xattrs.c
+8
-8
No files found.
acls.c
View file @
13710874
...
...
@@ -210,7 +210,7 @@ static void rsync_acl_free(rsync_acl *racl)
*
racl
=
empty_rsync_acl
;
}
void
free_acl
(
statx
*
sxp
)
void
free_acl
(
stat
_
x
*
sxp
)
{
if
(
sxp
->
acc_acl
)
{
rsync_acl_free
(
sxp
->
acc_acl
);
...
...
@@ -500,7 +500,7 @@ static int get_rsync_acl(const char *fname, rsync_acl *racl,
}
/* Return the Access Control List for the given filename. */
int
get_acl
(
const
char
*
fname
,
statx
*
sxp
)
int
get_acl
(
const
char
*
fname
,
stat
_
x
*
sxp
)
{
sxp
->
acc_acl
=
create_racl
();
if
(
get_rsync_acl
(
fname
,
sxp
->
acc_acl
,
SMB_ACL_TYPE_ACCESS
,
...
...
@@ -599,9 +599,9 @@ static void send_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type,
}
}
/* Send the ACL from the statx structure down the indicated file descriptor.
/* Send the ACL from the stat
_
x structure down the indicated file descriptor.
* This also frees the ACL data. */
void
send_acl
(
statx
*
sxp
,
int
f
)
void
send_acl
(
stat
_
x
*
sxp
,
int
f
)
{
if
(
!
sxp
->
acc_acl
)
{
sxp
->
acc_acl
=
create_racl
();
...
...
@@ -761,9 +761,9 @@ static int cache_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type, item_list *racl
return
ndx
;
}
/* Turn the ACL data in statx into cached ACL data, setting the index
/* Turn the ACL data in stat
_
x into cached ACL data, setting the index
* values in the file struct. */
void
cache_acl
(
struct
file_struct
*
file
,
statx
*
sxp
)
void
cache_acl
(
struct
file_struct
*
file
,
stat
_
x
*
sxp
)
{
F_ACL
(
file
)
=
cache_rsync_acl
(
sxp
->
acc_acl
,
SMB_ACL_TYPE_ACCESS
,
&
access_acl_list
);
...
...
@@ -851,7 +851,7 @@ static mode_t change_sacl_perms(SMB_ACL_T sacl, rsync_acl *racl, mode_t old_mode
}
static
int
set_rsync_acl
(
const
char
*
fname
,
acl_duo
*
duo_item
,
SMB_ACL_TYPE_T
type
,
statx
*
sxp
,
mode_t
mode
)
SMB_ACL_TYPE_T
type
,
stat
_
x
*
sxp
,
mode_t
mode
)
{
if
(
type
==
SMB_ACL_TYPE_DEFAULT
&&
duo_item
->
racl
.
user_obj
==
NO_ENTRY
)
{
...
...
@@ -891,7 +891,7 @@ static int set_rsync_acl(const char *fname, acl_duo *duo_item,
*
* Returns 1 for unchanged, 0 for changed, -1 for failed. Call this
* with fname set to NULL to just check if the ACL is unchanged. */
int
set_acl
(
const
char
*
fname
,
const
struct
file_struct
*
file
,
statx
*
sxp
)
int
set_acl
(
const
char
*
fname
,
const
struct
file_struct
*
file
,
stat
_
x
*
sxp
)
{
int
unchanged
=
1
;
int32
ndx
;
...
...
backup.c
View file @
13710874
...
...
@@ -97,7 +97,7 @@ int make_bak_dir(const char *fullpath)
char
fbuf
[
MAXPATHLEN
],
*
rel
,
*
end
,
*
p
;
struct
file_struct
*
file
;
int
len
=
backup_dir_len
;
statx
sx
;
stat
_
x
sx
;
while
(
*
fullpath
==
'.'
&&
fullpath
[
1
]
==
'/'
)
{
fullpath
+=
2
;
...
...
@@ -192,7 +192,7 @@ static int robust_move(const char *src, char *dst)
* We will move the file to be deleted into a parallel directory tree. */
static
int
keep_backup
(
const
char
*
fname
)
{
statx
sx
;
stat
_
x
sx
;
struct
file_struct
*
file
;
char
*
buf
;
int
kept
=
0
;
...
...
flist.c
View file @
13710874
...
...
@@ -1235,7 +1235,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
{
struct
file_struct
*
file
;
#if defined SUPPORT_ACLS || defined SUPPORT_XATTRS
statx
sx
;
stat
_
x
sx
;
#endif
file
=
make_file
(
fname
,
flist
,
stp
,
flags
,
filter_level
);
...
...
generator.c
View file @
13710874
...
...
@@ -515,7 +515,7 @@ static void do_delete_pass(void)
rprintf
(
FINFO
,
"
\r
"
);
}
int
unchanged_attrs
(
const
char
*
fname
,
struct
file_struct
*
file
,
statx
*
sxp
)
int
unchanged_attrs
(
const
char
*
fname
,
struct
file_struct
*
file
,
stat
_
x
*
sxp
)
{
if
(
preserve_perms
&&
!
BITS_EQUAL
(
sxp
->
st
.
st_mode
,
file
->
mode
,
CHMOD_BITS
))
return
0
;
...
...
@@ -547,7 +547,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, statx *sxp)
}
void
itemize
(
const
char
*
fnamecmp
,
struct
file_struct
*
file
,
int
ndx
,
int
statret
,
statx
*
sxp
,
int32
iflags
,
uchar
fnamecmp_type
,
stat
_
x
*
sxp
,
int32
iflags
,
uchar
fnamecmp_type
,
const
char
*
xname
)
{
if
(
statret
>=
0
)
{
/* A from-dest-dir statret can == 1! */
...
...
@@ -829,7 +829,7 @@ static int find_fuzzy(struct file_struct *file, struct file_list *dirlist)
* handling the file, -1 if no dest-linking occurred, or a non-negative
* value if we found an alternate basis file. */
static
int
try_dests_reg
(
struct
file_struct
*
file
,
char
*
fname
,
int
ndx
,
char
*
cmpbuf
,
statx
*
sxp
,
int
itemizing
,
char
*
cmpbuf
,
stat
_
x
*
sxp
,
int
itemizing
,
enum
logcode
code
)
{
int
best_match
=
-
1
;
...
...
@@ -934,7 +934,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
* handling the file, or -1 if no dest-linking occurred, or a non-negative
* value if we found an alternate basis file. */
static
int
try_dests_non
(
struct
file_struct
*
file
,
char
*
fname
,
int
ndx
,
char
*
cmpbuf
,
statx
*
sxp
,
int
itemizing
,
char
*
cmpbuf
,
stat
_
x
*
sxp
,
int
itemizing
,
enum
logcode
code
)
{
char
lnk
[
MAXPATHLEN
];
...
...
@@ -1124,7 +1124,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
static
int
need_fuzzy_dirlist
=
0
;
struct
file_struct
*
fuzzy_file
=
NULL
;
int
fd
=
-
1
,
f_copy
=
-
1
;
statx
sx
,
real_sx
;
stat
_
x
sx
,
real_sx
;
STRUCT_STAT
partial_st
;
struct
file_struct
*
back_file
=
NULL
;
int
statret
,
real_ret
,
stat_errno
;
...
...
hlink.c
View file @
13710874
...
...
@@ -202,7 +202,7 @@ void match_hard_links(struct file_list *flist)
}
static
int
maybe_hard_link
(
struct
file_struct
*
file
,
int
ndx
,
const
char
*
fname
,
int
statret
,
statx
*
sxp
,
const
char
*
fname
,
int
statret
,
stat
_
x
*
sxp
,
const
char
*
oldname
,
STRUCT_STAT
*
old_stp
,
const
char
*
realname
,
int
itemizing
,
enum
logcode
code
)
{
...
...
@@ -263,7 +263,7 @@ static char *check_prior(int prev_ndx, int gnum, struct file_list **flist_p)
/* Only called if FLAG_HLINKED is set and FLAG_HLINK_FIRST is not. Returns:
* 0 = process the file, 1 = skip the file, -1 = error occurred. */
int
hard_link_check
(
struct
file_struct
*
file
,
int
ndx
,
const
char
*
fname
,
int
statret
,
statx
*
sxp
,
int
itemizing
,
int
statret
,
stat
_
x
*
sxp
,
int
itemizing
,
enum
logcode
code
)
{
STRUCT_STAT
prev_st
;
...
...
@@ -331,7 +331,7 @@ int hard_link_check(struct file_struct *file, int ndx, const char *fname,
if
(
statret
<
0
&&
basis_dir
[
0
]
!=
NULL
)
{
/* If we match an alt-dest item, we don't output this as a change. */
char
cmpbuf
[
MAXPATHLEN
];
statx
alt_sx
;
stat
_
x
alt_sx
;
int
j
=
0
;
#ifdef SUPPORT_ACLS
alt_sx
.
acc_acl
=
alt_sx
.
def_acl
=
NULL
;
...
...
@@ -413,7 +413,7 @@ void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx,
STRUCT_STAT
*
stp
,
int
itemizing
,
enum
logcode
code
,
int
alt_dest
)
{
statx
prev_sx
;
stat
_
x
prev_sx
;
STRUCT_STAT
st
;
char
alt_name
[
MAXPATHLEN
],
*
prev_name
;
const
char
*
our_name
;
...
...
rsync.c
View file @
13710874
...
...
@@ -337,11 +337,11 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
return
new_mode
;
}
int
set_file_attrs
(
const
char
*
fname
,
struct
file_struct
*
file
,
statx
*
sxp
,
int
set_file_attrs
(
const
char
*
fname
,
struct
file_struct
*
file
,
stat
_
x
*
sxp
,
const
char
*
fnamecmp
,
int
flags
)
{
int
updated
=
0
;
statx
sx2
;
stat
_
x
sx2
;
int
change_uid
,
change_gid
;
mode_t
new_mode
=
file
->
mode
;
int
inherit
;
...
...
rsync.h
View file @
13710874
...
...
@@ -846,7 +846,7 @@ typedef struct {
#ifdef SUPPORT_XATTRS
item_list
*
xattr
;
#endif
}
statx
;
}
stat
_
x
;
#define ACL_READY(sx) ((sx).acc_acl != NULL)
#define XATTR_READY(sx) ((sx).xattr != NULL)
...
...
xattrs.c
View file @
13710874
...
...
@@ -90,7 +90,7 @@ static void rsync_xal_free(item_list *xalp)
xalp
->
count
=
0
;
}
void
free_xattr
(
statx
*
sxp
)
void
free_xattr
(
stat
_
x
*
sxp
)
{
if
(
!
sxp
->
xattr
)
return
;
...
...
@@ -268,7 +268,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
}
/* Read the xattr(s) for this filename. */
int
get_xattr
(
const
char
*
fname
,
statx
*
sxp
)
int
get_xattr
(
const
char
*
fname
,
stat
_
x
*
sxp
)
{
sxp
->
xattr
=
new
(
item_list
);
*
sxp
->
xattr
=
empty_xattr
;
...
...
@@ -330,7 +330,7 @@ static void rsync_xal_store(item_list *xalp)
}
/* Send the make_xattr()-generated xattr list for this flist entry. */
int
send_xattr
(
statx
*
sxp
,
int
f
)
int
send_xattr
(
stat
_
x
*
sxp
,
int
f
)
{
int
ndx
=
find_matching_xattr
(
sxp
->
xattr
);
...
...
@@ -376,7 +376,7 @@ int send_xattr(statx *sxp, int f)
/* Return a flag indicating if we need to change a file's xattrs. If
* "find_all" is specified, also mark any abbreviated xattrs that we
* need so that send_xattr_request() can tell the sender about them. */
int
xattr_diff
(
struct
file_struct
*
file
,
statx
*
sxp
,
int
find_all
)
int
xattr_diff
(
struct
file_struct
*
file
,
stat
_
x
*
sxp
,
int
find_all
)
{
item_list
*
lst
=
rsync_xal_l
.
items
;
rsync_xa
*
snd_rxa
,
*
rec_rxa
;
...
...
@@ -657,9 +657,9 @@ void receive_xattr(struct file_struct *file, int f)
F_XATTR
(
file
)
=
ndx
;
}
/* Turn the xattr data in statx into cached xattr data, setting the index
/* Turn the xattr data in stat
_
x into cached xattr data, setting the index
* values in the file struct. */
void
cache_xattr
(
struct
file_struct
*
file
,
statx
*
sxp
)
void
cache_xattr
(
struct
file_struct
*
file
,
stat
_
x
*
sxp
)
{
int
ndx
;
...
...
@@ -674,7 +674,7 @@ void cache_xattr(struct file_struct *file, statx *sxp)
}
static
int
rsync_xal_set
(
const
char
*
fname
,
item_list
*
xalp
,
const
char
*
fnamecmp
,
statx
*
sxp
)
const
char
*
fnamecmp
,
stat
_
x
*
sxp
)
{
rsync_xa
*
rxas
=
xalp
->
items
;
ssize_t
list_len
;
...
...
@@ -781,7 +781,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
/* Set extended attributes on indicated filename. */
int
set_xattr
(
const
char
*
fname
,
const
struct
file_struct
*
file
,
const
char
*
fnamecmp
,
statx
*
sxp
)
const
char
*
fnamecmp
,
stat
_
x
*
sxp
)
{
int
ndx
;
item_list
*
lst
=
rsync_xal_l
.
items
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment