summaryrefslogtreecommitdiffstats
path: root/commands/loadb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-14 09:35:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:46 +0200
commit473d6f8a7a16d1440f360b8562b746fbadee2d82 (patch)
treeeb5143054103647fd5402e6c92223af1b9f5de7e /commands/loadb.c
parent01f8f60cf06e180b2b5eb96ceb162473c0cb196a (diff)
downloadbarebox-473d6f8a7a16d1440f360b8562b746fbadee2d82.tar.gz
barebox-473d6f8a7a16d1440f360b8562b746fbadee2d82.tar.xz
stdio: replace fprintf(stderr,...) with eprintf
We have a shortcut for fprintf(stderr, so use it. This is done to be able to remove fprintf in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/loadb.c')
-rw-r--r--commands/loadb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/loadb.c b/commands/loadb.c
index 6223512477..6180ce371a 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -183,8 +183,7 @@ static int os_data_save(void)
ret = write(ofd, write_buffer,
MAX_WRITE_BUFFER);
if (ret < 0) {
- fprintf(stderr,
- "write to device failed\n");
+ eprintf("write to device failed\n");
return ret;
}
write_idx = 0;
@@ -563,7 +562,7 @@ static ulong load_serial_bin(void)
/* Try to allocate the buffer we shall write to files */
write_buffer = malloc(MAX_WRITE_BUFFER);
if (write_buffer == NULL) {
- fprintf(stderr, "could not allocate file i/o buffer\n");
+ eprintf("could not allocate file i/o buffer\n");
return -ENOMEM;
}
@@ -585,7 +584,7 @@ static ulong load_serial_bin(void)
if (write_idx > 0) {
i = write(ofd, write_buffer, write_idx);
if (i < 0) {
- fprintf(stderr, "write to device failed\n");
+ eprintf("write to device failed\n");
size = i;
goto err_quit;
}