2016-07-08 11:26:26 -07:00
|
|
|
#ifndef __PROGRAM_H__
|
|
|
|
|
#define __PROGRAM_H__
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
|
|
struct program {
|
|
|
|
|
unsigned sector_size;
|
|
|
|
|
unsigned file_offset;
|
|
|
|
|
const char *filename;
|
|
|
|
|
const char *label;
|
|
|
|
|
unsigned num_sectors;
|
|
|
|
|
unsigned partition;
|
|
|
|
|
unsigned size;
|
|
|
|
|
bool sparse;
|
|
|
|
|
const char *start_bytes;
|
|
|
|
|
const char *start_sector;
|
|
|
|
|
|
|
|
|
|
struct program *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int program_load(const char *program_file);
|
2018-03-26 16:55:11 +02:00
|
|
|
int program_execute(int usbfd, int (*apply)(int usbfd, struct program *program, int fd),
|
|
|
|
|
const char *incdir);
|
2017-11-06 23:21:15 -08:00
|
|
|
int program_find_bootable_partition(void);
|
2016-07-08 11:26:26 -07:00
|
|
|
|
|
|
|
|
#endif
|