aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubirmvol.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-02-06 18:59:15 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-02-06 18:59:15 +0200
commita71f0ce8c5f80757096f6e4d0ebca27ccbe14da9 (patch)
tree07645e323044fcfb331df157a80a84b624cdab51 /ubi-utils/src/ubirmvol.c
parentf3d507be006c46870818c549b8f7dc0b4daccf03 (diff)
ubi-tools: improve printing macros
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubirmvol.c')
-rw-r--r--ubi-utils/src/ubirmvol.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ubi-utils/src/ubirmvol.c b/ubi-utils/src/ubirmvol.c
index ca315a3..c30446a 100644
--- a/ubi-utils/src/ubirmvol.c
+++ b/ubi-utils/src/ubirmvol.c
@@ -28,7 +28,6 @@
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <libubi.h>
#include "common.h"
@@ -143,11 +142,8 @@ int main(int argc, char * const argv[])
return -1;
libubi = libubi_open();
- if (libubi == NULL) {
- errmsg("cannot open libubi");
- perror("libubi_open");
- return -1;
- }
+ if (libubi == NULL)
+ return sys_errmsg("cannot open libubi");
err = ubi_node_type(libubi, args.node);
if (err == 2) {
@@ -161,8 +157,7 @@ int main(int argc, char * const argv[])
err = ubi_rmvol(libubi, args.node, args.vol_id);
if (err) {
- errmsg("cannot UBI remove volume");
- perror("ubi_rmvol");
+ sys_errmsg("cannot UBI remove volume");
goto out_libubi;
}