* [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures
@ 2015-01-26 15:43 Rob Herring
2015-02-18 17:50 ` Przemyslaw Marczak
2015-03-06 15:43 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2015-01-26 15:43 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures
2015-01-26 15:43 [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures Rob Herring
@ 2015-02-18 17:50 ` Przemyslaw Marczak
2015-03-06 15:43 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Przemyslaw Marczak @ 2015-02-18 17:50 UTC (permalink / raw)
To: u-boot
Hello Rob,
On 01/26/2015 04:43 PM, Rob Herring wrote:
> 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;
> }
>
> /**
>
This one commit, is ok.
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] gpt: fix error reporting on partition table write failures
2015-01-26 15:43 [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures Rob Herring
2015-02-18 17:50 ` Przemyslaw Marczak
@ 2015-03-06 15:43 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-03-06 15:43 UTC (permalink / raw)
To: u-boot
On Mon, Jan 26, 2015 at 09:43:15AM -0600, Rob Herring wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/3d360a16/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-06 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-26 15:43 [U-Boot] [PATCH] gpt: fix error reporting on partition table write failures Rob Herring
2015-02-18 17:50 ` Przemyslaw Marczak
2015-03-06 15:43 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox