mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
694cc87b76
commit
a150e6c9df
1 changed files with 2 additions and 2 deletions
|
@ -281,11 +281,11 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* save partitions layout to disk */
|
/* 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(str_disk_guid);
|
||||||
free(partitions);
|
free(partitions);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue