summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubimkvol.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/ubimkvol.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/ubimkvol.c')
-rw-r--r--ubi-utils/src/ubimkvol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ubi-utils/src/ubimkvol.c b/ubi-utils/src/ubimkvol.c
index dba7133..b5805a4 100644
--- a/ubi-utils/src/ubimkvol.c
+++ b/ubi-utils/src/ubimkvol.c
@@ -251,7 +251,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;
}