diff mbox series

emmc handler: fix partition number indexing in boot device string

Message ID 20241021063255.79162-1-mseben@gmail.com
State Accepted
Headers show
Series emmc handler: fix partition number indexing in boot device string | expand

Commit Message

michal seben Oct. 21, 2024, 6:32 a.m. UTC
Signed-off-by: michal seben <mseben@gmail.com>
---
 handlers/emmc_csd_handler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Oct. 21, 2024, 7:05 a.m. UTC | #1
On 21.10.24 08:32, michal seben wrote:
> Signed-off-by: michal seben <mseben@gmail.com>
> ---
>   handlers/emmc_csd_handler.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/handlers/emmc_csd_handler.c b/handlers/emmc_csd_handler.c
> index f6e8e2cf..15715a8e 100644
> --- a/handlers/emmc_csd_handler.c
> +++ b/handlers/emmc_csd_handler.c
> @@ -62,7 +62,7 @@ static int emmc_csd_set(struct img_type *img, void *data, bool toggle)
>   			ERROR("The value for boot device is not set");
>   			return -EINVAL;
>   		}
> -		active = strtoul(&boot[5], NULL, 10);
> +		active = strtoul(&boot[4], NULL, 10);
>   		if (errno || (active != 0 && active != 1)) {
>   			ERROR("Wrong boot device set: %s", img->device);
>

Yes, of course, thanks !

I apply it.

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/handlers/emmc_csd_handler.c b/handlers/emmc_csd_handler.c
index f6e8e2cf..15715a8e 100644
--- a/handlers/emmc_csd_handler.c
+++ b/handlers/emmc_csd_handler.c
@@ -62,7 +62,7 @@  static int emmc_csd_set(struct img_type *img, void *data, bool toggle)
 			ERROR("The value for boot device is not set");
 			return -EINVAL;
 		}
-		active = strtoul(&boot[5], NULL, 10);
+		active = strtoul(&boot[4], NULL, 10);
 		if (errno || (active != 0 && active != 1)) {
 			ERROR("Wrong boot device set: %s", img->device);