program: dropped unused attributes

The attributes size_in_KB, sparse and start_byte_hex
are not used and seem to be optional. Some program
xml files do not always contain them which then causes
qdl to crash. Simply removing the unused attributes
fixes this problem.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Daniel Kutik
2018-10-05 12:44:44 +08:00
committed by Bjorn Andersson
parent a50ec8047c
commit cfce0beeab
2 changed files with 0 additions and 6 deletions

View File

@@ -110,9 +110,6 @@ int program_load(const char *program_file)
program->label = attr_as_string(node, "label", &errors);
program->num_sectors = attr_as_unsigned(node, "num_partition_sectors", &errors);
program->partition = attr_as_unsigned(node, "physical_partition_number", &errors);
program->size = attr_as_unsigned(node, "size_in_KB", &errors);
program->sparse = attr_as_bool(node, "sparse", &errors);
program->start_bytes = attr_as_string(node, "start_byte_hex", &errors);
program->start_sector = attr_as_string(node, "start_sector", &errors);
if (errors) {

View File

@@ -10,9 +10,6 @@ struct program {
const char *label;
unsigned num_sectors;
unsigned partition;
unsigned size;
bool sparse;
const char *start_bytes;
const char *start_sector;
struct program *next;