summaryrefslogtreecommitdiffstats
path: root/commands/ubi.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-28 17:34:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-29 08:41:53 +0200
commit9699096f1eccd742d898f471b046181ea90dd582 (patch)
tree1b62f4c159a6ae9b90eac7d750a4833b0e30a7dc /commands/ubi.c
parent12d74001d52911dfb96d81b774183aeaba21370c (diff)
downloadbarebox-9699096f1eccd742d898f471b046181ea90dd582.tar.gz
barebox-9699096f1eccd742d898f471b046181ea90dd582.tar.xz
treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifier
Using %pe instead of PTR_ERR has the benefit of being less verbose and less error-prone (no negation necessary) while potentially reducing code size. Make use of it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/ubi.c')
-rw-r--r--commands/ubi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/ubi.c b/commands/ubi.c
index f37684102d..f866f00160 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -304,8 +304,8 @@ static int do_ubirmvol(int argc, char *argv[])
desc = ubi_open_volume_nm(ubinum, argv[2], UBI_EXCLUSIVE);
if (IS_ERR(desc)) {
+ printf("failed to open volume %s: %pe\n", argv[2], desc);
ret = PTR_ERR(desc);
- printf("failed to open volume %s: %s\n", argv[2], strerror(-ret));
goto err;
}