Move all induction folder related host code into induct.c

This commit is contained in:
jsteube
2016-09-22 17:06:53 +02:00
parent b6f966970b
commit 919b5d5148
4 changed files with 162 additions and 132 deletions
+5 -2
View File
@@ -10,8 +10,11 @@
#include <sys/stat.h>
#include <unistd.h>
#define INDUCT_DIR "induct"
static const char INDUCT_DIR[] = "induct";
int sort_by_mtime (const void *p1, const void *p2);
int induct_ctx_init (induct_ctx_t *induct_ctx, const user_options_t *user_options, const folder_config_t *folder_config, const time_t proc_start);
void induct_ctx_scan (induct_ctx_t *induct_ctx);
void induct_ctx_cleanup (induct_ctx_t *induct_ctx);
void induct_ctx_destroy (induct_ctx_t *induct_ctx);
#endif // _INDUCT_H
+12 -1
View File
@@ -892,6 +892,17 @@ typedef struct
} folder_config_t;
typedef struct
{
bool enabled;
char *root_directory;
char **induction_dictionaries;
int induction_dictionaries_cnt;
} induct_ctx_t;
typedef struct
{
/**
@@ -965,7 +976,6 @@ typedef struct
u32 maskpos;
char *eff_restore_file;
char *new_restore_file;
char *induction_directory;
char *outfile_check_directory;
u32 pw_min;
u32 pw_max;
@@ -981,6 +991,7 @@ typedef struct
debugfile_ctx_t *debugfile_ctx;
session_ctx_t *session_ctx;
bitmap_ctx_t *bitmap_ctx;
induct_ctx_t *induct_ctx;
/**
* used for restore