diff options
author | Rob Herring <rob.herring@linaro.org> | 2015-01-23 12:09:19 -0600 |
---|---|---|
committer | Rob Herring <rob.herring@linaro.org> | 2015-01-27 17:04:47 -0600 |
commit | cb6a75d59e142821db4373ccf8aa8237e58ccf8e (patch) | |
tree | 58b02bbe50ab673e80222d24c1119f7c4117871c | |
parent | bea5339fb62517a76bf772b59da1ce57bd86cc21 (diff) |
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.
Change-Id: I8bd69bc19b259f0c8ba7759a3c2b4cbec03d78ac
Signed-off-by: Rob Herring <rob.herring@linaro.org>
-rw-r--r-- | common/cmd_gpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_gpt.c b/common/cmd_gpt.c index e38422d792..75df3feca2 100644 --- a/common/cmd_gpt.c +++ b/common/cmd_gpt.c @@ -281,11 +281,11 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part) } /* 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(partitions); - return 0; + return ret; } /** |