Commit 653447b407ba2774eb398e7b35f80d2e25463da6

Authored by Stephen Warren
Committed by Tom Rini
1 parent 69bf2d2faf

part: fix "part list ... -bootable varname" to use hex

Unfortunately U-Boot assumes that almost all numbers are in hex, including
partition numbers passed to e.g. "load". So, the command "part list mmc 0
-bootable devplist" should use hex when writing partition numbers into
$devplist, so they'll be correctly interpreted.

Change-Id: I9a70b19749643876baadb45efbc3decaef8bfee2
Fixes: 0798d6fd4191 ("part: Add support for list filtering on bootable partitions")
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -100,7 +100,7 @@
100 100 if (bootable && !info.bootable)
101 101 continue;
102 102  
103   - sprintf(t, "%s%d", str[0] ? " " : "", p);
  103 + sprintf(t, "%s%x", str[0] ? " " : "", p);
104 104 strcat(str, t);
105 105 }
106 106 setenv(var, str);