diff options
author | Rob Herring <robh@kernel.org> | 2015-01-26 15:43:15 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-05 16:17:53 (GMT) |
commit | a150e6c9df04f8c5eb4c7f550a109e3e34aafa81 (patch) | |
tree | e643c2248ea92b9cb207079016b786086d620ca3 | |
parent | 694cc87b76b1063a2a7a8bd1809e990df0a469f8 (diff) | |
download | u-boot-a150e6c9df04f8c5eb4c7f550a109e3e34aafa81.tar.xz |
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: Rob Herring <robh@kernel.org>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
-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 e38422d..75df3fe 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; } /** |