public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures
Date: Mon, 26 Jan 2015 09:43:15 -0600	[thread overview]
Message-ID: <1422286995-23681-1-git-send-email-robh@kernel.org> (raw)

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>
---
 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

             reply	other threads:[~2015-01-26 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 15:43 Rob Herring [this message]
2015-02-18 17:50 ` [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures Przemyslaw Marczak
2015-03-06 15:43 ` [U-Boot] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422286995-23681-1-git-send-email-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox