summaryrefslogtreecommitdiff
path: root/common/cmd_gpt.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2015-01-26 09:43:15 -0600
committerTom Rini <trini@konsulko.com>2015-03-05 11:17:53 -0500
commita150e6c9df04f8c5eb4c7f550a109e3e34aafa81 (patch)
treee643c2248ea92b9cb207079016b786086d620ca3 /common/cmd_gpt.c
parent694cc87b76b1063a2a7a8bd1809e990df0a469f8 (diff)
downloadu-boot-imx-a150e6c9df04f8c5eb4c7f550a109e3e34aafa81.zip
u-boot-imx-a150e6c9df04f8c5eb4c7f550a109e3e34aafa81.tar.gz
u-boot-imx-a150e6c9df04f8c5eb4c7f550a109e3e34aafa81.tar.bz2
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>
Diffstat (limited to 'common/cmd_gpt.c')
-rw-r--r--common/cmd_gpt.c4
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;
}
/**