From a71f0ce8c5f80757096f6e4d0ebca27ccbe14da9 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 6 Feb 2008 18:59:15 +0200 Subject: ubi-tools: improve printing macros Signed-off-by: Artem Bityutskiy --- ubi-utils/src/ubirmvol.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'ubi-utils/src/ubirmvol.c') 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 #include #include -#include #include #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; } -- cgit v1.2.3