aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubirmvol.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-22 17:24:07 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-22 17:27:57 +0300
commit00d99ae46cfef3a399e82d161f8bf705ec0c10d0 (patch)
treec04e7ab197f211ffd48a37215e0e56c328f43375 /ubi-utils/src/ubirmvol.c
parente4d974bb63355d1fff92eaae4df5f0cdf3597dc3 (diff)
libubi: improve errors handling
Improve comments about what is returned if UBI device or node does not exist. Better check for ENODEV error code. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubirmvol.c')
-rw-r--r--ubi-utils/src/ubirmvol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ubi-utils/src/ubirmvol.c b/ubi-utils/src/ubirmvol.c
index 17aece4..f7a3820 100644
--- a/ubi-utils/src/ubirmvol.c
+++ b/ubi-utils/src/ubirmvol.c
@@ -193,7 +193,10 @@ int main(int argc, char * const argv[])
args.node);
goto out_libubi;
} else if (err < 0) {
- errmsg("\"%s\" is not an UBI device node", args.node);
+ if (errno == ENODEV)
+ errmsg("\"%s\" is not an UBI device node", args.node);
+ else
+ sys_errmsg("error while probing \"%s\"", args.node);
goto out_libubi;
}