* [PATCH] commands: avb_pvalue: fix print out of wrong arguments in error message
@ 2025-04-09 9:47 Ahmad Fatoum
2025-04-10 7:25 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-09 9:47 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
read_varname is always NULL whenever write_varname is non-NULL.
Replace it by the correct string to indicate where the failure occurred.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
commands/avb_pvalue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commands/avb_pvalue.c b/commands/avb_pvalue.c
index adc44321fb54..d91c311de5ec 100644
--- a/commands/avb_pvalue.c
+++ b/commands/avb_pvalue.c
@@ -55,7 +55,7 @@ static int do_avb_pvalue(int argc, char *argv[])
if (filename) {
ret = read_file_2(filename, &size, &buf, FILESIZE_MAX);
if (ret) {
- printf("Cannot read %s: %pe\n", read_varname, ERR_PTR(ret));
+ printf("Cannot read %s: %pe\n", filename, ERR_PTR(ret));
return COMMAND_ERROR;
}
} else {
@@ -67,7 +67,7 @@ static int do_avb_pvalue(int argc, char *argv[])
}
ret = avb_write_persistent_value(write_varname, size, buf);
if (ret) {
- printf("Cannot write variable %s: %pe\n", read_varname, ERR_PTR(ret));
+ printf("Cannot write variable %s: %pe\n", write_varname, ERR_PTR(ret));
goto err;
}
}
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 9:47 [PATCH] commands: avb_pvalue: fix print out of wrong arguments in error message Ahmad Fatoum
2025-04-10 7:25 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox