Commit b6e0ea31 authored by Bjorn Andersson's avatar Bjorn Andersson
Browse files

program: Make start_sector unsigned in

For unknown reasons start_sector was a staring, turn it into an unsigned
integer instead.

Signed-off-by: default avatarBjorn Andersson <>
parent 56076936
......@@ -336,7 +336,7 @@ static int firehose_program(struct qdl_device *qdl, struct program *program, int
xml_setpropf(node, "SECTOR_SIZE_IN_BYTES", "%d", program->sector_size);
xml_setpropf(node, "num_partition_sectors", "%d", num_sectors);
xml_setpropf(node, "physical_partition_number", "%d", program->partition);
xml_setpropf(node, "start_sector", "%s", program->start_sector);
xml_setpropf(node, "start_sector", "%d", program->start_sector);
if (program->filename)
xml_setpropf(node, "filename", "%s", program->filename);
......@@ -415,7 +415,7 @@ static int firehose_apply_patch(struct qdl_device *qdl, struct patch *patch)
xml_setpropf(node, "filename", "%s", patch->filename);
xml_setpropf(node, "physical_partition_number", "%d", patch->partition);
xml_setpropf(node, "size_in_bytes", "%d", patch->size_in_bytes);
xml_setpropf(node, "start_sector", "%s", patch->start_sector);
xml_setpropf(node, "start_sector", "%d", patch->start_sector);
xml_setpropf(node, "value", "%s", patch->value);
ret = firehose_write(qdl, doc);
......@@ -75,7 +75,7 @@ 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->start_sector = attr_as_string(node, "start_sector", &errors);
program->start_sector = attr_as_unsigned(node, "start_sector", &errors);
if (errors) {
fprintf(stderr, "[PROGRAM] errors while parsing program\n");
......@@ -11,7 +11,7 @@ struct program {
const char *label;
unsigned num_sectors;
unsigned partition;
const char *start_sector;
unsigned start_sector;
struct program *next;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment