Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Output even more debug messages.
[rsync/rsync.git]
/
hlink.c
diff --git
a/hlink.c
b/hlink.c
index
1e8adc8
..
598743d
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-22,7
+22,6
@@
#include "rsync.h"
#include "rsync.h"
-extern int verbose;
extern int dry_run;
extern int list_only;
extern int am_sender;
extern int dry_run;
extern int list_only;
extern int am_sender;
@@
-69,8
+68,14
@@
struct ht_int64_node *idev_find(int64 dev, int64 ino)
if (!dev_node || dev_node->key != dev) {
/* We keep a separate hash table of inodes for every device. */
dev_node = hashtable_find(dev_tbl, dev, 1);
if (!dev_node || dev_node->key != dev) {
/* We keep a separate hash table of inodes for every device. */
dev_node = hashtable_find(dev_tbl, dev, 1);
- if (!(tbl = dev_node->data))
+ if (!(tbl = dev_node->data))
{
tbl = dev_node->data = hashtable_create(512, SIZEOF_INT64 == 8);
tbl = dev_node->data = hashtable_create(512, SIZEOF_INT64 == 8);
+ if (DEBUG_GTE(HLINK, 2)) {
+ rprintf(FINFO,
+ "[%s] created hashtable for dev %s\n",
+ who_am_i(), big_num(dev, 0));
+ }
+ }
} else
tbl = dev_node->data;
} else
tbl = dev_node->data;
@@
-215,7
+220,7
@@
static int maybe_hard_link(struct file_struct *file, int ndx,
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS,
0, "");
}
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS,
0, "");
}
- if (
verbose > 1
&& maybe_ATTRS_REPORT)
+ if (
INFO_GTE(NAME, 2)
&& maybe_ATTRS_REPORT)
rprintf(FCLIENT, "%s is uptodate\n", fname);
file->flags |= FLAG_HLINK_DONE;
return 0;
rprintf(FCLIENT, "%s is uptodate\n", fname);
file->flags |= FLAG_HLINK_DONE;
return 0;
@@
-236,7
+241,7
@@
static int maybe_hard_link(struct file_struct *file, int ndx,
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0,
realname);
}
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0,
realname);
}
- if (code != FNONE &&
verbose
)
+ if (code != FNONE &&
INFO_GTE(NAME, 1)
)
rprintf(code, "%s => %s\n", fname, realname);
return 0;
}
rprintf(code, "%s => %s\n", fname, realname);
return 0;
}
@@
-377,10
+382,10
@@
int hard_link_check(struct file_struct *file, int ndx, const char *fname,
continue;
statret = 1;
if (stdout_format_has_i == 0
continue;
statret = 1;
if (stdout_format_has_i == 0
- || (
verbose < 2
&& stdout_format_has_i < 2)) {
+ || (
!INFO_GTE(NAME, 2)
&& stdout_format_has_i < 2)) {
itemizing = 0;
code = FNONE;
itemizing = 0;
code = FNONE;
- if (
verbose > 1
&& maybe_ATTRS_REPORT)
+ if (
INFO_GTE(NAME, 2)
&& maybe_ATTRS_REPORT)
rprintf(FCLIENT, "%s is uptodate\n", fname);
}
break;
rprintf(FCLIENT, "%s is uptodate\n", fname);
}
break;
@@
-426,7
+431,7
@@
int hard_link_one(struct file_struct *file, const char *fname,
if (do_link(oldname, fname) < 0) {
enum logcode code;
if (terse) {
if (do_link(oldname, fname) < 0) {
enum logcode code;
if (terse) {
- if (!
verbose
)
+ if (!
INFO_GTE(NAME, 1)
)
return 0;
code = FINFO;
} else
return 0;
code = FINFO;
} else