Skip to content
Snippets Groups Projects
Commit a150e6c9 authored by Rob Herring's avatar Rob Herring Committed by Tom Rini
Browse files

gpt: fix error reporting on partition table write failures


The gpt command always reports success even if writing the partition table
failed. Propagate the return value of gpt_restore so we get proper status
reported.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
parent 694cc87b
No related branches found
No related tags found
No related merge requests found
...@@ -281,11 +281,11 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part) ...@@ -281,11 +281,11 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part)
} }
/* save partitions layout to disk */ /* save partitions layout to disk */
gpt_restore(blk_dev_desc, str_disk_guid, partitions, part_count); ret = gpt_restore(blk_dev_desc, str_disk_guid, partitions, part_count);
free(str_disk_guid); free(str_disk_guid);
free(partitions); free(partitions);
return 0; return ret;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment