X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e4c598c830234fe3def0bae6ba45ca54071a9ee5..14013906ca0ee2d226f0baba74811f60224c35e2:/xattrs.c diff --git a/xattrs.c b/xattrs.c index 7e3b74a1..df1a2a1c 100644 --- a/xattrs.c +++ b/xattrs.c @@ -139,7 +139,7 @@ static ssize_t get_xattr_names(const char *fname) got_error: rsyserr(FERROR_XFER, errno, "get_xattr_names: llistxattr(\"%s\",%s) failed", - fname, big_num(arg)); + full_fname(fname), big_num(arg)); return -1; } list_len = sys_llistxattr(fname, NULL, 0); @@ -175,7 +175,7 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr return NULL; rsyserr(FERROR_XFER, errno, "get_xattr_data: lgetxattr(\"%s\",\"%s\",0) failed", - fname, name); + full_fname(fname), name); return NULL; } @@ -192,11 +192,11 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr if (len == (size_t)-1) { rsyserr(FERROR_XFER, errno, "get_xattr_data: lgetxattr(\"%s\",\"%s\",%ld)" - " failed", fname, name, (long)datum_len); + " failed", full_fname(fname), name, (long)datum_len); } else { rprintf(FERROR_XFER, "get_xattr_data: lgetxattr(\"%s\",\"%s\",%ld)" - " returned %ld\n", fname, name, + " returned %ld\n", full_fname(fname), name, (long)datum_len, (long)len); } free(ptr); @@ -336,8 +336,8 @@ int copy_xattrs(const char *source, const char *dest) if (sys_lsetxattr(dest, name, ptr, datum_len) < 0) { int save_errno = errno ? errno : EINVAL; rsyserr(FERROR_XFER, errno, - "rsync_xal_set: lsetxattr(\"%s\",\"%s\") failed", - dest, name); + "copy_xattrs: lsetxattr(\"%s\",\"%s\") failed", + full_fname(dest), name); errno = save_errno; return -1; } @@ -661,7 +661,7 @@ void receive_xattr(int f, struct file_struct *file) F_XATTR(file) = ndx - 1; return; } - + if ((count = read_varint(f)) != 0) { (void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count); temp_xattr.count = 0; @@ -822,7 +822,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp, else if (sys_lsetxattr(fname, name, ptr, len) < 0) { rsyserr(FERROR_XFER, errno, "rsync_xal_set: lsetxattr(\"%s\",\"%s\") failed", - fname, name); + full_fname(fname), name); ret = -1; } else /* make sure caller sets mtime */ sxp->st.st_mtime = (time_t)-1; @@ -843,7 +843,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp, if (sys_lsetxattr(fname, name, rxas[i].datum, rxas[i].datum_len) < 0) { rsyserr(FERROR_XFER, errno, "rsync_xal_set: lsetxattr(\"%s\",\"%s\") failed", - fname, name); + full_fname(fname), name); ret = -1; } else /* make sure caller sets mtime */ sxp->st.st_mtime = (time_t)-1; @@ -872,8 +872,8 @@ static int rsync_xal_set(const char *fname, item_list *xalp, if (i == xalp->count) { if (sys_lremovexattr(fname, name) < 0) { rsyserr(FERROR_XFER, errno, - "rsync_xal_clear: lremovexattr(\"%s\",\"%s\") failed", - fname, name); + "rsync_xal_set: lremovexattr(\"%s\",\"%s\") failed", + full_fname(fname), name); ret = -1; } else /* make sure caller sets mtime */ sxp->st.st_mtime = (time_t)-1; @@ -935,7 +935,7 @@ int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t if (sys_lsetxattr(fname, name, buf, buf_len) < 0) { rsyserr(FERROR_XFER, errno, "set_xattr_acl: lsetxattr(\"%s\",\"%s\") failed", - fname, name); + full_fname(fname), name); return -1; } return 0;