aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-12-03 01:20:42 -0600
committerRob Landley <rob@landley.net>2017-12-03 01:20:42 -0600
commitebceb16fd2992f76a1b4b42eec2b6d0d380935ac (patch)
treea3b2b5bff542a20b6b667caf86eb163e207057d1
parent3cc79396fd8b7e64f4cd2267261f3fcda8391827 (diff)
downloadtoybox-ebceb16fd2992f76a1b4b42eec2b6d0d380935ac.tar.gz
Gaël PORTAY wants mdev to work when Linux has the block layer configured out.
-rw-r--r--toys/pending/mdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/mdev.c b/toys/pending/mdev.c
index a270e520..9ee1f642 100644
--- a/toys/pending/mdev.c
+++ b/toys/pending/mdev.c
@@ -226,7 +226,7 @@ void mdev_main(void)
if (toys.optflags) {
dirtree_read("/sys/class", callback);
- dirtree_read("/sys/block", callback);
+ if (!access("/sys/block", R_OK)) dirtree_read("/sys/block", callback);
} else { // hotplug support
make_device(NULL);
}