Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
92cc9dd
)
Updated a questioning comment.
author
Wayne Davison
<wayned@samba.org>
Sun, 11 Jan 2004 08:17:19 +0000
(08:17 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sun, 11 Jan 2004 08:17:19 +0000
(08:17 +0000)
hlink.c
patch
|
blob
|
blame
|
history
diff --git
a/hlink.c
b/hlink.c
index
289842e
..
402f6c5
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-102,11
+102,12
@@
int check_hard_link(struct file_struct *file)
low = mid + 1;
}
low = mid + 1;
}
- /* XXX: To me this looks kind of dodgy -- why do we use [low]
- * here and [low-1] below? -- mbp */
+ /* Check if we ended up finding the file struct or not. */
if (hlink_compare(&hlink_list[low], &file) != 0)
return 0;
if (hlink_compare(&hlink_list[low], &file) != 0)
return 0;
+ /* Now check if the previous item shares the current one's device
+ * and inode. If so, we're not the "master", so return 1. */
if (low > 0 &&
file->F_DEV == hlink_list[low - 1]->F_DEV &&
file->F_INODE == hlink_list[low - 1]->F_INODE) {
if (low > 0 &&
file->F_DEV == hlink_list[low - 1]->F_DEV &&
file->F_INODE == hlink_list[low - 1]->F_INODE) {