refactoring loading dump files

This commit is contained in:
iceman1001 2022-05-15 23:06:46 +02:00
commit d4c3082741
6 changed files with 84 additions and 162 deletions

View file

@ -260,4 +260,16 @@ int searchFile(char **foundpath, const char *pm3dir, const char *searchname, con
* @return
*/
DumpFileType_t getfiletype(const char *filename);
/**
* @brief load dump file into a data array dynamically allocated
* @param fn
* @param pdump pointer to loaded dump
* @param dumplen the number of bytes loaded from dump file
* @param maxdumplen maximum size of data array in bytes (JSON files)
* @return PM3_SUCCESS if OK
*/
int pm3_load_dump(const char *fn, void **pdump, size_t *dumplen, size_t maxdumplen);
#endif // FILEUTILS_H