[PATCH master] pblimage: suppress stdout output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux