summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubirename.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/ubirename.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/ubirename.c')
-rw-r--r--ubi-utils/src/ubirename.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ubi-utils/src/ubirename.c b/ubi-utils/src/ubirename.c
index 08b3cd5..00c53e4 100644
--- a/ubi-utils/src/ubirename.c
+++ b/ubi-utils/src/ubirename.c
@@ -105,7 +105,10 @@ int main(int argc, char * const argv[])
node);
goto out_libubi;
} else if (err < 0) {
- errmsg("\"%s\" is not an UBI device node", node);
+ if (errno == ENODEV)
+ errmsg("\"%s\" is not an UBI device node", node);
+ else
+ sys_errmsg("error while probing \"%s\"", node);
goto out_libubi;
}