From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 26 Jan 2015 09:43:15 -0600 Subject: [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures Message-ID: <1422286995-23681-1-git-send-email-robh@kernel.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- common/cmd_gpt.c | 4 ++-- 1 file 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; } /** -- 2.1.0