* [PATCH master] pblimage: suppress stdout output
@ 2024-05-03 10:08 Ahmad Fatoum
2024-05-06 6:16 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-05-03 10:08 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Any output, stdout or stderr, during normal operation looks jarring when
interleaved with Kbuild, so utilities should just be always silent on
stdout and print errors to stderr if they occur.
The pblimage tool violated this and had a stdout debug print left-over and
printed part of an error message to stdout instead of stderr. Fix both
instances.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/pblimage.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/pblimage.c b/scripts/pblimage.c
index ef09b0f96084..610d93b36800 100644
--- a/scripts/pblimage.c
+++ b/scripts/pblimage.c
@@ -258,7 +258,6 @@ static void pbl_load_image(void)
read(in_fd, mem_buf + 0x1000, image_size);
pbl_size = 0x1000 + image_size;
- printf("%s imagesize: %d\n", rcwfile, image_size);
} else {
exit(EXIT_FAILURE);
}
@@ -419,7 +418,7 @@ int main(int argc, char *argv[])
if (soc_type == SOC_TYPE_INVALID) {
fprintf(stderr, "Invalid CPU type %s. Valid types are:\n", cputypestr);
for (i = 0; i < ARRAY_SIZE(socs); i++)
- printf(" %s\n", socs[i].name);
+ fprintf(stderr, " %s\n", socs[i].name);
exit(EXIT_FAILURE);
}
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-06 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 10:08 [PATCH master] pblimage: suppress stdout output Ahmad Fatoum
2024-05-06 6:16 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox