XML Export / Import Progress:
* Exporter finished * Imported started. Currently reading in nodes and printing them. * Add XSD file for automatic validation. Working. TODO: * Correcly handle main logic of import export * Finish importer
This commit is contained in:
@@ -6,9 +6,35 @@
|
||||
#include <patchelfcrc/crc.h>
|
||||
#include <patchelfcrc/elfpatch.h>
|
||||
|
||||
struct xml_crc_entry {
|
||||
uint64_t vma;
|
||||
uint64_t size;
|
||||
uint32_t crc;
|
||||
};
|
||||
|
||||
struct xml_crc_import {
|
||||
int elf_bits;
|
||||
struct crc_settings crc_config;
|
||||
SlList *xml_crc_entries; /**< @brief linked list of @ref xml_crc_entry structs */
|
||||
};
|
||||
|
||||
void xml_init(void);
|
||||
|
||||
int xml_write_crcs_to_file(const char *path, const uint32_t *crcs, SlList *section_names,
|
||||
const struct crc_settings *crc_params, elfpatch_handle_t *ep);
|
||||
|
||||
/**
|
||||
* @brief xml_import_from_file Import from file
|
||||
* @param path Path to import from
|
||||
* @return Returns a newly allocated struct. Must be freed with @ref xml_crc_import_free
|
||||
* @return NULL in case of error
|
||||
*/
|
||||
struct xml_crc_import *xml_import_from_file(const char *path);
|
||||
|
||||
/**
|
||||
* @brief Fully free supplied import data
|
||||
* @param data Data to free
|
||||
*/
|
||||
void xml_crc_import_free(struct xml_crc_import *data);
|
||||
|
||||
#endif /* _ELFPATCHCRC_XML_H_ */
|
||||
|
Reference in New Issue
Block a user