summaryrefslogtreecommitdiff
path: root/ubi-utils/src/libmtd_legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/src/libmtd_legacy.c')
-rw-r--r--ubi-utils/src/libmtd_legacy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ubi-utils/src/libmtd_legacy.c b/ubi-utils/src/libmtd_legacy.c
index cd474b1..b477a4f 100644
--- a/ubi-utils/src/libmtd_legacy.c
+++ b/ubi-utils/src/libmtd_legacy.c
@@ -218,8 +218,13 @@ int legacy_get_dev_info(const char *node, struct mtd_dev_info *mtd)
loff_t offs = 0;
struct proc_parse_info pi;
- if (stat(node, &st))
- return sys_errmsg("cannot open \"%s\"", node);
+ if (stat(node, &st)) {
+ sys_errmsg("cannot open \"%s\"", node);
+ if (errno == ENOENT)
+ normsg("MTD subsystem is old and does not support "
+ "sysfs, so MTD character device nodes have "
+ "to exist");
+ }
if (!S_ISCHR(st.st_mode)) {
errno = EINVAL;