From cfce0beeab8ca7808565f650fcafe0a372c90a7f Mon Sep 17 00:00:00 2001 From: Daniel Kutik Date: Fri, 5 Oct 2018 12:44:44 +0800 Subject: [PATCH] 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 --- program.c | 3 --- program.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/program.c b/program.c index 1247c2b..739305a 100644 --- a/program.c +++ b/program.c @@ -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) { diff --git a/program.h b/program.h index 542e911..0198330 100644 --- a/program.h +++ b/program.h @@ -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;