mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
exposing function
This commit is contained in:
parent
a9d89c7d06
commit
307e39bb22
2 changed files with 3 additions and 4 deletions
|
@ -225,7 +225,7 @@ static char *filenamemcopy(const char *preferredName, const char *suffix) {
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *newfilenamemcopy(const char *preferredName, const char *suffix) {
|
char *newfilenamemcopy(const char *preferredName, const char *suffix) {
|
||||||
if (preferredName == NULL) return NULL;
|
if (preferredName == NULL) return NULL;
|
||||||
if (suffix == NULL) return NULL;
|
if (suffix == NULL) return NULL;
|
||||||
uint16_t preferredNameLen = strlen(preferredName);
|
uint16_t preferredNameLen = strlen(preferredName);
|
||||||
|
@ -948,12 +948,10 @@ int loadFileJSONex(const char *preferredName, void *data, size_t maxdatalen, siz
|
||||||
if (fileName == NULL) return PM3_EMALLOC;
|
if (fileName == NULL) return PM3_EMALLOC;
|
||||||
|
|
||||||
*datalen = 0;
|
*datalen = 0;
|
||||||
json_t *root;
|
|
||||||
json_error_t error;
|
json_error_t error;
|
||||||
|
|
||||||
int retval = PM3_SUCCESS;
|
int retval = PM3_SUCCESS;
|
||||||
|
|
||||||
root = json_load_file(fileName, 0, &error);
|
json_t *root = json_load_file(fileName, 0, &error);
|
||||||
if (!root) {
|
if (!root) {
|
||||||
PrintAndLogEx(ERR, "ERROR: json " _YELLOW_("%s") " error on line %d: %s", fileName, error.line, error.text);
|
PrintAndLogEx(ERR, "ERROR: json " _YELLOW_("%s") " error on line %d: %s", fileName, error.line, error.text);
|
||||||
retval = PM3_ESOFT;
|
retval = PM3_ESOFT;
|
||||||
|
|
|
@ -77,6 +77,7 @@ int fileExists(const char *filename);
|
||||||
//bool create_path(const char *dirname);
|
//bool create_path(const char *dirname);
|
||||||
//bool setDefaultPath (savePaths_t pathIndex,const char *Path); // set a path in the path list session.defaultPaths
|
//bool setDefaultPath (savePaths_t pathIndex,const char *Path); // set a path in the path list session.defaultPaths
|
||||||
|
|
||||||
|
char *newfilenamemcopy(const char *preferredName, const char *suffix);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Utility function to save data to a binary file. This method takes a preferred name, but if that
|
* @brief Utility function to save data to a binary file. This method takes a preferred name, but if that
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue