summaryrefslogtreecommitdiffstats
path: root/common/firmware.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-10 08:11:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-11 16:46:25 +0200
commitb6c514bd1c2e13955ddd6a26df2c33ae74f17d0b (patch)
treec15bcedb9f2f15e41abc69f4bad3a06a92ae7add /common/firmware.c
parent15111afb387482035fc64ca5b621ec6c933ac7f8 (diff)
downloadbarebox-b6c514bd1c2e13955ddd6a26df2c33ae74f17d0b.tar.gz
barebox-b6c514bd1c2e13955ddd6a26df2c33ae74f17d0b.tar.xz
treewide: replace errno_str() with %m printf format specifier
Both errno_str() and printf("%m" end up calling strerror(). %m is more convenient to use, so switch over all instances to it. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221010061122.2084009-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/firmware.c')
-rw-r--r--common/firmware.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/firmware.c b/common/firmware.c
index b87d7da38f..e4ad6ac867 100644
--- a/common/firmware.c
+++ b/common/firmware.c
@@ -272,8 +272,7 @@ int firmwaremgr_load_file(struct firmware_mgr *mgr, const char *firmware)
firmwarefd = open(firmware, O_RDONLY);
if (firmwarefd < 0) {
- printf("could not open %s: %s\n", firmware,
- errno_str());
+ printf("could not open %s: %m\n", firmware);
ret = firmwarefd;
goto out;
}
@@ -282,7 +281,7 @@ int firmwaremgr_load_file(struct firmware_mgr *mgr, const char *firmware)
devicefd = open(dst, O_WRONLY);
if (devicefd < 0) {
- printf("could not open %s: %s\n", dst, errno_str());
+ printf("could not open %s: %m\n", dst);
ret = devicefd;
goto out;
}