From 00d99ae46cfef3a399e82d161f8bf705ec0c10d0 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 22 Apr 2009 17:24:07 +0300 Subject: 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 --- ubi-utils/src/ubirmvol.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ubi-utils/src/ubirmvol.c') 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; } -- cgit v1.2.3