gpt: fix error reporting on partition table write failures
PATCH 1/1 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.
--- common/cmd_gpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/cmd_gpt.c +2 -2
@@ -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; }/**
Signature · 1 line
2.1.0
PATCH 1/1 gpt: fix error reporting on partition table write failures
Hello Rob,
Quoted 18 lines · Rob Herring
The gpt command always reports success even if writing the partition table failed. Propagate the return value of
gpt_restoreso we get proper status reported.Signed-off-by Rob Herring <[email protected]>--- common/cmd_gpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/cmd_gpt.c +0
-0@@ -281,11 +281,11 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part) }/* save partitions layout to disk */
common/cmd_gpt.c static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part) · line 291
Quoted 10 lines
common/cmd_gpt.c +2
-2-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.
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
Quoted 6 lines · Rob Herring
The gpt command always reports success even if writing the partition table failed. Propagate the return value of
gpt_restoreso we get proper status reported.Signed-off-by Rob Herring <[email protected]>Reviewed-by Przemyslaw Marczak <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>