/* This function converts the characters in the "in" xbuf into characters
* in the "out" xbuf. The "len" of the "in" xbuf is used starting from its
* "pos". The "size" of the "out" xbuf restricts how many characters can be
/* This function converts the characters in the "in" xbuf into characters
* in the "out" xbuf. The "len" of the "in" xbuf is used starting from its
* "pos". The "size" of the "out" xbuf restricts how many characters can be
#endif
int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
#endif
int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
- ndx, first_flist->ndx_start - 1, first_flist->prev->ndx_end,
- iflags, who_am_i());
+ ndx, start - 1, start + used -1, iflags, who_am_i());
-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,
int change_uid, change_gid;
mode_t new_mode = file->mode;
int inherit;
int change_uid, change_gid;
mode_t new_mode = file->mode;
int inherit;
- rsyserr(FERROR, errno, "stat %s failed",
+ rsyserr(FERROR_XFER, errno, "stat %s failed",
if (preserve_xattrs && fnamecmp)
set_xattr(fname, file, fnamecmp, sxp);
if (preserve_xattrs && fnamecmp)
set_xattr(fname, file, fnamecmp, sxp);
&& cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
int ret = set_modtime(fname, file->modtime, sxp->st.st_mode);
if (ret < 0) {
&& cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
int ret = set_modtime(fname, file->modtime, sxp->st.st_mode);
if (ret < 0) {
- rsyserr(FERROR, errno, "failed to set times on %s",
+ rsyserr(FERROR_XFER, errno, "failed to set times on %s",
change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
&& sxp->st.st_gid != (gid_t)F_GROUP(file);
#if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK
change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
&& sxp->st.st_gid != (gid_t)F_GROUP(file);
#if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK
change_gid ? (gid_t)F_GROUP(file) : sxp->st.st_gid) != 0) {
/* shouldn't have attempted to change uid or gid
* unless have the privilege */
change_gid ? (gid_t)F_GROUP(file) : sxp->st.st_gid) != 0) {
/* shouldn't have attempted to change uid or gid
* unless have the privilege */
- rsyserr(FERROR, errno, "%s %s failed",
+ rsyserr(FERROR_XFER, errno, "%s %s failed",
#ifdef SUPPORT_ACLS
/* It's OK to call set_acl() now, even for a dir, as the generator
* will enable owner-writability using chmod, if necessary.
#ifdef SUPPORT_ACLS
/* It's OK to call set_acl() now, even for a dir, as the generator
* will enable owner-writability using chmod, if necessary.
if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
int ret = am_root < 0 ? 0 : do_chmod(fname, new_mode);
if (ret < 0) {
if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
int ret = am_root < 0 ? 0 : do_chmod(fname, new_mode);
if (ret < 0) {
ret = robust_rename(fnametmp, fname, partialptr,
file->mode & INITACCESSPERMS);
if (ret < 0) {
ret = robust_rename(fnametmp, fname, partialptr,
file->mode & INITACCESSPERMS);
if (ret < 0) {
- rsyserr(FERROR, errno, "%s %s -> \"%s\"",
+ rsyserr(FERROR_XFER, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
full_fname(fnametmp), fname);
do_unlink(fnametmp);
ret == -2 ? "copy" : "rename",
full_fname(fnametmp), fname);
do_unlink(fnametmp);
- rsyserr(FERROR, errno, "rename %s -> \"%s\"",
+ rsyserr(FERROR_XFER, errno, "rename %s -> \"%s\"",
full_fname(fnametmp), fname);
} else
handle_partial_dir(partialptr, PDIR_DELETE);
full_fname(fnametmp), fname);
} else
handle_partial_dir(partialptr, PDIR_DELETE);