diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/directory_scanner.c | 3 | ||||
| -rw-r--r-- | src/file_processor.c | 5 | ||||
| -rw-r--r-- | src/options.c | 1 |
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"); } |
