2016-07-08 11:26:26 -07:00
|
|
|
#ifndef __PATCH_H__
|
|
|
|
|
#define __PATCH_H__
|
|
|
|
|
|
2018-11-09 17:33:51 -08:00
|
|
|
struct qdl_device;
|
|
|
|
|
|
2016-07-08 11:26:26 -07:00
|
|
|
struct patch {
|
2025-06-18 09:39:54 +02:00
|
|
|
unsigned int sector_size;
|
|
|
|
|
unsigned int byte_offset;
|
2016-07-08 11:26:26 -07:00
|
|
|
const char *filename;
|
2025-06-18 09:39:54 +02:00
|
|
|
unsigned int partition;
|
|
|
|
|
unsigned int size_in_bytes;
|
2021-04-29 10:25:55 -05:00
|
|
|
const char *start_sector;
|
2016-07-08 11:26:26 -07:00
|
|
|
const char *value;
|
|
|
|
|
const char *what;
|
|
|
|
|
|
|
|
|
|
struct patch *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int patch_load(const char *patch_file);
|
2018-11-09 17:33:51 -08:00
|
|
|
int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, struct patch *patch));
|
2024-12-13 13:05:57 -06:00
|
|
|
void free_patches(void);
|
2016-07-08 11:26:26 -07:00
|
|
|
|
|
|
|
|
#endif
|