aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-29 19:34:08 -0600
committerRob Landley <rob@landley.net>2018-11-29 19:34:08 -0600
commita87efd2ab0c9ed622b608ffa93c6ca8526c6474c (patch)
treeb3d5b53e519e8fd1e3aa7840754916f9be21096d
parent2d0251960835631e7db202c131757ca599ed19e3 (diff)
downloadtoybox-a87efd2ab0c9ed622b608ffa93c6ca8526c6474c.tar.gz
Marius Adaskevicius pointed out mdev -s should follow symlinks.
-rw-r--r--toys/pending/mdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/pending/mdev.c b/toys/pending/mdev.c
index 0493f1a5..d0bb0681 100644
--- a/toys/pending/mdev.c
+++ b/toys/pending/mdev.c
@@ -280,7 +280,8 @@ static int callback(struct dirtree *node)
// Circa 2.6.25 the entries more than 2 deep are all either redundant
// (mouse#, event#) or unnamed (every usb_* entry is called "device").
- return (node->parent && node->parent->parent) ? 0 : DIRTREE_RECURSE;
+ if (node->parent && node->parent->parent) return 0;
+ return DIRTREE_RECURSE|DIRTREE_SYMFOLLOW;
}
void mdev_main(void)