data. no longer required in restore

This commit is contained in:
jsteube
2016-09-25 01:02:44 +02:00
parent 59ebe10b07
commit fd72834322
13 changed files with 328 additions and 261 deletions
+4
View File
@@ -23,6 +23,10 @@
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#define PW_MIN 0
#define PW_MAX 54
#define PW_MAX1 (PW_MAX + 1)
#define EXEC_CACHE 128
#define SPEED_CACHE 128
-4
View File
@@ -12,10 +12,6 @@
#include <errno.h>
#include <limits.h>
#define PW_MIN 0
#define PW_MAX 54
#define PW_MAX1 (PW_MAX + 1)
/**
* weak hashes shutcut
*/
+10 -6
View File
@@ -23,16 +23,20 @@
#define RESTORE_VERSION_MIN 320
#define RESTORE_VERSION_CUR 320
u64 get_lowest_words_done (opencl_ctx_t *opencl_ctx);
u64 get_lowest_words_done (const restore_ctx_t *restore_ctx, const opencl_ctx_t *opencl_ctx);
restore_data_t *init_restore (int argc, char **argv, const user_options_t *user_options);
void init_restore (restore_ctx_t *restore_ctx);
void read_restore (const char *eff_restore_file, restore_data_t *rd);
void read_restore (restore_ctx_t *restore_ctx);
void write_restore (opencl_ctx_t *opencl_ctx, const char *new_restore_file, restore_data_t *rd);
void write_restore (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx);
void cycle_restore (opencl_ctx_t *opencl_ctx);
void cycle_restore (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx);
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx, const user_options_t *user_options);
void stop_at_checkpoint (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx);
int restore_ctx_init (restore_ctx_t *restore_ctx, user_options_t *user_options, const folder_config_t *folder_config, int argc, char **argv);
void restore_ctx_destroy (restore_ctx_t *restore_ctx);
#endif // _RESTORE_H
+2 -2
View File
@@ -11,8 +11,8 @@
double get_avg_exec_time (hc_device_param_t *device_param, const int last_num_entries);
void status_display_machine_readable (opencl_ctx_t *opencl_ctx, const hashes_t *hashes, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
void status_display (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const hashes_t *hashes, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
void status_display_machine_readable (opencl_ctx_t *opencl_ctx, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
void status_display (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const hashes_t *hashes, const restore_ctx_t *restore_ctx, const user_options_t *user_options, const user_options_extra_t *user_options_extra, const rules_ctx_t *rules_ctx);
void status_benchmark_automate (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig);
void status_benchmark (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, const user_options_t *user_options);
+15 -8
View File
@@ -875,6 +875,20 @@ typedef struct
} restore_data_t;
typedef struct
{
bool enabled;
int argc;
char **argv;
char *eff_restore_file;
char *new_restore_file;
restore_data_t *rd;
} restore_ctx_t;
typedef struct
{
u32 len;
@@ -1175,8 +1189,6 @@ typedef struct
char *mask;
u32 maskcnt;
u32 maskpos;
char *eff_restore_file;
char *new_restore_file;
u32 pw_min;
u32 pw_max;
@@ -1195,12 +1207,7 @@ typedef struct
outcheck_ctx_t *outcheck_ctx;
logfile_ctx_t *logfile_ctx;
rules_ctx_t *rules_ctx;
/**
* used for restore
*/
restore_data_t *rd;
restore_ctx_t *restore_ctx;
/**
* status, timer
+4 -4
View File
@@ -243,15 +243,15 @@ static const struct option long_options[] =
{0, 0, 0, 0}
};
void user_options_init (user_options_t *user_options, int myargc, char **myargv);
void user_options_init (user_options_t *user_options);
void user_options_destroy (user_options_t *user_options);
int user_options_parse (user_options_t *user_options, int myargc, char **myargv);
int user_options_parse (user_options_t *user_options, int argc, char **argv);
int user_options_sanity (user_options_t *user_options, int myargc, char **myargv, user_options_extra_t *user_options_extra);
int user_options_sanity (user_options_t *user_options, restore_ctx_t *restore_ctx, user_options_extra_t *user_options_extra);
int user_options_extra_init (user_options_t *user_options, int myargc, char **myargv, user_options_extra_t *user_options_extra);
int user_options_extra_init (user_options_t *user_options, restore_ctx_t *restore_ctx, user_options_extra_t *user_options_extra);
void user_options_extra_destroy (user_options_extra_t *user_options_extra);