aboutsummaryrefslogtreecommitdiff
path: root/toys/other/modinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other/modinfo.c')
-rw-r--r--toys/other/modinfo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c
index 61155b46..69cdf27e 100644
--- a/toys/other/modinfo.c
+++ b/toys/other/modinfo.c
@@ -74,6 +74,8 @@ static void modinfo_file(char *full_name)
static int check_module(struct dirtree *new)
{
+ if (!dirtree_notdotdot(new)) return 0;
+
if (S_ISREG(new->st.st_mode)) {
char *s;
@@ -88,14 +90,14 @@ static int check_module(struct dirtree *new)
}
if (s[len] || strcmp(new->name+len, ".ko")) break;
- modinfo_file(s = dirtree_path(new, NULL));
+ modinfo_file(s = dirtree_path(new, 0));
free(s);
return DIRTREE_ABORT;
}
}
- return dirtree_notdotdot(new);
+ return DIRTREE_RECURSE;
}
void modinfo_main(void)