Make verbose variable available to all translation units - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 617a4c0156ded44bc631696a4caa59ba3f706cce DIR parent 20a85fa453b901904957822d2ab31165209852b4 HTML Author: sin <sin@2f30.org> Date: Wed, 27 Feb 2019 15:01:08 +0000 Make verbose variable available to all translation units Other units may want to print verbose information when verbose is non zero. Diffstat: M dedup.c | 3 ++- M dedup.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) --- DIR diff --git a/dedup.c b/dedup.c @@ -36,10 +36,11 @@ static struct cache *cache; static int ifd; static int sfd; static int cfd; -static int verbose; static int cache_dirty; static unsigned long long cache_hits; static unsigned long long cache_misses; + +int verbose; char *argv0; static size_t DIR diff --git a/dedup.h b/dedup.h @@ -59,6 +59,9 @@ struct cache_entry { uint64_t size; }; +/* dedup.c */ +extern int verbose; + /* cache.c */ struct cache *alloc_cache(void); void free_cache(struct cache *cache);