procfs: must only look at extended_entries if set

This commit is contained in:
K. Lange 2018-12-03 09:53:10 +09:00
parent cade020b95
commit d258287644

View File

@ -857,11 +857,13 @@ static fs_node_t * finddir_procfs_root(fs_node_t * node, char * name) {
}
}
foreach(node, extended_entries) {
struct procfs_entry * e = node->value;
if (!strcmp(name, e->name)) {
fs_node_t * out = procfs_generic_create(e->name, e->func);
return out;
if (extended_entries) {
foreach(node, extended_entries) {
struct procfs_entry * e = node->value;
if (!strcmp(name, e->name)) {
fs_node_t * out = procfs_generic_create(e->name, e->func);
return out;
}
}
}