diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-08-16 11:36:54 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-08-18 07:37:45 +0200 |
commit | 57b568dc570f5ecc73d0657af868ba7d04df39a0 (patch) | |
tree | 46e679c04e33b8b905232fd9da38cd42b50976d5 /commands/loadxy.c | |
parent | 06703b05b8ce26ee396cb986a904416cd7e0798f (diff) | |
download | barebox-57b568dc570f5ecc73d0657af868ba7d04df39a0.tar.gz barebox-57b568dc570f5ecc73d0657af868ba7d04df39a0.tar.xz |
lib: open_and_lseek(): move error messages to callers
For some cases like in common/filetype.c the caller already prints an
error message, so to avoid duplicated error messages leave it up to
the caller to print an error. This also adds error messages to all
callers where necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/loadxy.c')
-rw-r--r-- | commands/loadxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/loadxy.c b/commands/loadxy.c index 66daa117d9..e2d1a11a2c 100644 --- a/commands/loadxy.c +++ b/commands/loadxy.c @@ -165,7 +165,7 @@ static int do_loadx(int argc, char *argv[]) /* File should exist */ ofd = open_and_lseek(output_file, O_WRONLY | O_CREAT, offset); if (ofd < 0) { - perror(argv[0]); + printf("Could not open \"%s\": %m\n", output_file); return 3; } |