diff mbox series

[libubootenv] Use correct pointer for loading script file

Message ID 1555495466-8360-1-git-send-email-mark.jonas@de.bosch.com
State Accepted
Headers show
Series [libubootenv] Use correct pointer for loading script file | expand

Commit Message

Jonas Mark (BT-FIR/ENG1-Grb) April 17, 2019, 10:04 a.m. UTC
From: Leo Ruan <tingquan.ruan@cn.bosch.com>

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 src/fw_printenv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic April 18, 2019, 1:02 p.m. UTC | #1
On 17/04/19 12:04, Mark Jonas wrote:
> From: Leo Ruan <tingquan.ruan@cn.bosch.com>
> 
> Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> ---
>  src/fw_printenv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/fw_printenv.c b/src/fw_printenv.c
> index a561db4..93663a3 100644
> --- a/src/fw_printenv.c
> +++ b/src/fw_printenv.c
> @@ -146,7 +146,7 @@ int main (int argc, char **argv) {
>  		}
>  	} else { /* setenv branch */
>  		if (scriptfile)
> -			libuboot_load_file(ctx, defenvfile);
> +			libuboot_load_file(ctx, scriptfile);

This is an obvious bug that I have not tracked by using
scriptfile=defvenvfile. Thanks for fixing this !

>  		else {
>  			for (int i = 0; i < argc; i += 2) {
>  				if (i + 1 == argc)
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/src/fw_printenv.c b/src/fw_printenv.c
index a561db4..93663a3 100644
--- a/src/fw_printenv.c
+++ b/src/fw_printenv.c
@@ -146,7 +146,7 @@  int main (int argc, char **argv) {
 		}
 	} else { /* setenv branch */
 		if (scriptfile)
-			libuboot_load_file(ctx, defenvfile);
+			libuboot_load_file(ctx, scriptfile);
 		else {
 			for (int i = 0; i < argc; i += 2) {
 				if (i + 1 == argc)