]> Git Repo - J-u-boot.git/blobdiff - cmd/bcb.c
Azure CI: Save pytest output automatically
[J-u-boot.git] / cmd / bcb.c
index 1622a90c97f0354963d4ab9141e82e85207710a4..02d0c70d87e24a4e99daaa5691b25c71bae32e1d 100644 (file)
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -14,6 +14,7 @@
 #include <part.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <linux/err.h>
 
 enum bcb_cmd {
        BCB_CMD_LOAD,
@@ -128,6 +129,16 @@ static int __bcb_load(int devnum, const char *partp)
                goto err_read_fail;
        }
 
+       /*
+        * always select the USER mmc hwpart in case another
+        * blk operation selected a different hwpart
+        */
+       ret = blk_dselect_hwpart(desc, 0);
+       if (IS_ERR_VALUE(ret)) {
+               ret = -ENODEV;
+               goto err_read_fail;
+       }
+
        part = simple_strtoul(partp, &endp, 0);
        if (*endp == '\0') {
                ret = part_get_info(desc, part, &info);
This page took 0.023095 seconds and 4 git commands to generate.