disk: allow - or empty string to fall back to $bootdevice
PATCH 1/1 disk: allow - or empty string to fall back to $bootdevice
From: Stephen Warren <[email protected]>
Commit 10a37fd "disk: get_device_and_partition() "auto" partition" prevented the use of "-" on the command-line to request fallback to the $bootdevice environment variable instead. This patch allows that, or an empty string "" to be used.
Tested:
setenv bootfile /boot/zImage
setenv bootdevice 0:1
ext2load mmc 0:1
ext2load mmc -
ext2load mmc ""
--- disk/part.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
disk/part.c +2 -1
@@ -489,7 +489,8 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,disk_partition_t tmpinfo;/* If no dev_part_str, use bootdevice environment variable */ -if (!dev_part_str) +if (!dev_part_str || !strlen (dev_part_str) || + !strcmp (dev_part_str,"-" )) dev_part_str =getenv ("bootdevice" );/* If still no dev_part_str, it's an error */
Signature · 1 line
1.7.0.4
PATCH 1/1 disk: allow - or empty string to fall back to $bootdevice
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Commit 10a37fd "disk:
get_device_and_partition()"auto" partition" prevented the use of "-" on the command-line to request fallback to the $bootdevice environment variable instead. This patch allows that, or an empty string "" to be used.
Quoted 8 lines
Tested:
setenv bootfile/boot/zImage
setenv bootdevice 0:1
ext2load mmc 0:1
ext2load mmc -
ext2load mmc ""Signed-off-by Stephen Warren <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120928/87e0c77c/attachment.pgp>