Commit 13710874 authored by Wayne Davison's avatar Wayne Davison

Changed "statx" to "stat_x" to try to work around a build problem on AIX.

parent 7341ee2d
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment