aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2026-03-01 19:30:09 +0100
committerThorsten Töpper <atsutane@freethoughts.de>2026-03-01 19:30:09 +0100
commit951ba68794bc228e00c40d36cca44c65da69603c (patch)
treeeb36035362a55b2a3a5fe3244e741d186f00753f /src
parent97accf560f501677bc0a5432a85e6f6fd1f16b3b (diff)
downloadduplicate_finder-951ba68794bc228e00c40d36cca44c65da69603c.tar.gz
duplicate_finder-951ba68794bc228e00c40d36cca44c65da69603c.tar.bz2
Be more verbose when scanning.
Diffstat (limited to 'src')
-rw-r--r--src/directory_scanner.c3
-rw-r--r--src/file_processor.c5
-rw-r--r--src/options.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/directory_scanner.c b/src/directory_scanner.c
index 0ae1e31..0f2d64c 100644
--- a/src/directory_scanner.c
+++ b/src/directory_scanner.c
@@ -101,6 +101,9 @@ int traverse_directory_tree(const char *starting_point) {
/* In case there are still entries on an existing pstack, take them with you */
while (tmp != NULL) {
+ if (! option_quiet) {
+ LOGERR("Read directory %s\n", tmp);
+ }
DBGTRC("DEBUG: process directory %s next\n", tmp);
rc = process_directory(tmp);
if (rc < 0) { return -1; }
diff --git a/src/file_processor.c b/src/file_processor.c
index da51e30..b2b4f85 100644
--- a/src/file_processor.c
+++ b/src/file_processor.c
@@ -24,6 +24,7 @@
#include "hex_conversion.h"
#include "kv_manager.h"
#include "database_interaction.h"
+#include "options.h"
/*=========== DEFINES, CONSTANTS AND TYPES ===========*/
@@ -229,6 +230,10 @@ int process_file(struct df_fileinfo *info) {
return -1;
}
+ if ( ! option_quiet ) {
+ LOGERR("Calculating hashes for file '%s'\n", fullpath);
+ }
+
/* TODO: proper fread related error handling */
while (true) {
bytes_read = fread(buffer, sizeof(unsigned char), glbl_bufsize, fdin);
diff --git a/src/options.c b/src/options.c
index 7bcd9b0..0b55df1 100644
--- a/src/options.c
+++ b/src/options.c
@@ -59,6 +59,7 @@ void usage(char *executable) {
fprintf(stderr, " %-10s %-10s %s\n", "analyze", "", "Currently no parameter");
fprintf(stderr, " %-10s %-10s %s\n", "dump", "fullpath", "Print the full stored path of each files entry");
fprintf(stderr, " %-10s %-10s %s\n", "", "fileinfos", "Print all entries combined with hashes");
+ fprintf(stderr, " %-10s %-10s %s\n", "", "filenames", "Print all filenames (without path)");
fprintf(stderr, " %-10s %-10s %s\n", "scan", "", "path in the FS below which files should be scanned");
}