1
mirror of https://github.com/hashcat/hashcat synced 2024-12-23 14:13:43 +01:00

Update folder.c function parameters

This commit is contained in:
jsteube 2016-10-06 16:17:29 +02:00
parent a5e83c27c3
commit 662ddec0bb
3 changed files with 10 additions and 6 deletions

View File

@ -38,7 +38,7 @@ int count_dictionaries (char **dictionary_files);
char **scan_directory (const char *path); char **scan_directory (const char *path);
int folder_config_init (folder_config_t *folder_config, const char *install_folder, const char *shared_folder); int folder_config_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder, const char *shared_folder);
void folder_config_destroy (folder_config_t *folder_config); void folder_config_destroy (hashcat_ctx_t *hashcat_ctx);
int hc_mkdir (const char *name, int mode); int hc_mkdir (const char *name, int mode);

View File

@ -236,8 +236,10 @@ char **scan_directory (const char *path)
return (files); return (files);
} }
int folder_config_init (folder_config_t *folder_config, const char *install_folder, const char *shared_folder) int folder_config_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder, const char *shared_folder)
{ {
folder_config_t *folder_config = hashcat_ctx->folder_config;
/** /**
* There's some buggy OpenCL runtime that do not support -I. * There's some buggy OpenCL runtime that do not support -I.
* A workaround is to chdir() to the OpenCL folder, * A workaround is to chdir() to the OpenCL folder,
@ -411,8 +413,10 @@ int folder_config_init (folder_config_t *folder_config, const char *install_fold
return 0; return 0;
} }
void folder_config_destroy (folder_config_t *folder_config) void folder_config_destroy (hashcat_ctx_t *hashcat_ctx)
{ {
folder_config_t *folder_config = hashcat_ctx->folder_config;
myfree (folder_config->cpath_real); myfree (folder_config->cpath_real);
myfree (folder_config->cwd); myfree (folder_config->cwd);
myfree (folder_config->install_dir); myfree (folder_config->install_dir);

View File

@ -1260,7 +1260,7 @@ int hashcat (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_fold
* folder * folder
*/ */
folder_config_init (folder_config, install_folder, shared_folder); folder_config_init (hashcat_ctx, install_folder, shared_folder);
/** /**
* restore * restore
@ -1507,7 +1507,7 @@ int hashcat (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_fold
outcheck_ctx_destroy (outcheck_ctx); outcheck_ctx_destroy (outcheck_ctx);
folder_config_destroy (folder_config); folder_config_destroy (hashcat_ctx);
user_options_extra_destroy (user_options_extra); user_options_extra_destroy (user_options_extra);