aboutsummaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 3c8023c..7bcd9b0 100644
--- a/src/options.c
+++ b/src/options.c
@@ -39,7 +39,7 @@ char *exec_name;
/* === IMPLEMENTATION === */
void usage(char *executable) {
- fprintf(stderr, "Call: %s OPTIONS scan|analyze [path]\n", executable);
+ fprintf(stderr, "Call: %s OPTIONS scan|analyze|dump PARAMETERS\n", executable);
fprintf(stderr, "\nOPTIONS are\n");
/* long name, short name, optional argument, explanation */
fprintf(stderr, " %-25s %2s %10s - %s\n", "--all", "-a", "",
@@ -54,6 +54,12 @@ void usage(char *executable) {
"If the kv storage file already exists replace it with a new one");
fprintf(stderr, " %-25s %2s %10s - %s\n", "--quiet", "-q", "",
"Don't print error messages or warnings");
+
+ fprintf(stderr, "\nParameters\n");
+ 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", "scan", "", "path in the FS below which files should be scanned");
}
@@ -160,6 +166,8 @@ int parse_arguments(int argc, char **argv) {
option_mode = MODE_SCAN;
} else if (strcmp("analyze", argv[optind]) == 0) {
option_mode = MODE_ANALYZE_DB;
+ } else if (strcmp("dump", argv[optind]) == 0) {
+ option_mode = MODE_DUMP;
} else {
LOGERR("ERROR: No valid mode given see --help or man.\n");
exit(EXIT_FAILURE);