summaryrefslogtreecommitdiff
path: root/flist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-07-18 17:35:22 -0700
committerWayne Davison <wayned@samba.org>2008-07-18 17:35:22 -0700
commit28a5b78c6f13aeac716d4aaf4248b8d8763c9b8b (patch)
treed55c92e09aa24707ed5233086d876aec39266850 /flist.c
parent7bbd60101e81aabc366c0187bd66af5be777deb8 (diff)
downloadrsync-28a5b78c6f13aeac716d4aaf4248b8d8763c9b8b.tar.gz
Improved the hard-link logging.
Diffstat (limited to 'flist.c')
-rw-r--r--flist.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/flist.c b/flist.c
index 109497d4..b3a26535 100644
--- a/flist.c
+++ b/flist.c
@@ -475,10 +475,15 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
xflags |= XMIT_HLINK_FIRST;
}
if (DEBUG_GTE(HLINK, 1)) {
- rprintf(FINFO, "found %s dev:inode %s:%s (#%ld)\n",
- xflags & XMIT_HLINK_FIRST ? "first" : "matching",
- big_num(tmp_dev, 0), big_num(tmp_ino, 0),
- (long)np->data - 1);
+ if (first_hlink_ndx >= 0) {
+ rprintf(FINFO, "[%s] #%d hard-links #%d (%sabbrev)\n",
+ who_am_i(), first_ndx + ndx, first_hlink_ndx,
+ first_hlink_ndx >= first_ndx ? "" : "un");
+ } else if (DEBUG_GTE(HLINK, 3)) {
+ rprintf(FINFO, "[%s] dev:inode for #%d is %s:%s\n",
+ who_am_i(), first_ndx + ndx,
+ big_num(tmp_dev, 0), big_num(tmp_ino, 0));
+ }
}
} else {
if (tmp_dev == dev) {
@@ -529,11 +534,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
#ifdef SUPPORT_HARD_LINKS
if (first_hlink_ndx >= 0) {
write_varint(f, first_hlink_ndx);
- if (first_hlink_ndx >= first_ndx) {
- if (DEBUG_GTE(HLINK, 2))
- rprintf(FINFO, "sending abbr. entry\n");
+ if (first_hlink_ndx >= first_ndx)
goto the_end;
- }
}
#endif
@@ -728,9 +730,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
first_hlink_ndx, flist->ndx_start + flist->used);
exit_cleanup(RERR_PROTOCOL);
}
- if (DEBUG_GTE(HLINK, 2)) {
- rprintf(FINFO, "hard-link reference #%d (%sabbr.)\n",
- first_hlink_ndx,
+ if (DEBUG_GTE(HLINK, 1)) {
+ rprintf(FINFO, "[%s] #%d hard-links #%d (%sabbrev)\n",
+ who_am_i(), flist->used+flist->ndx_start, first_hlink_ndx,
first_hlink_ndx >= flist->ndx_start ? "" : "un");
}
if (first_hlink_ndx >= flist->ndx_start) {