Files
qdl/program.h
Bjorn Andersson a29f44cc07 qdl: Make failed program or patch operation stop execution
Failures to apply program or patch operations are silently ignored,
forcing the user to inspect the logs to conclude if the flashing
succeded. Instead make the operations halt execution.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-21 11:55:16 -07:00

26 lines
486 B
C

#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;
bool readback;
unsigned size;
bool sparse;
const char *start_bytes;
const char *start_sector;
struct program *next;
};
int program_load(const char *program_file);
int program_execute(int usbfd, int (*apply)(int usbfd, struct program *program, int fd));
#endif