Allow devfs path rules to work on directories. Without this fix,
devfs rule add path fd unhide is a no-op, while it should unhide the fd subdirectory. Approved by: phk, rwatson (mentor) PR: kern/60897
This commit is contained in:
parent
b991815bc0
commit
9f8ef8b8d1
@ -633,7 +633,8 @@ devfs_rule_matchpath(struct devfs_krule *dk, struct devfs_dirent *de)
|
||||
dev = devfs_rule_getdev(de);
|
||||
if (dev != NULL)
|
||||
pname = dev->si_name;
|
||||
else if (de->de_dirent->d_type == DT_LNK)
|
||||
else if (de->de_dirent->d_type == DT_LNK ||
|
||||
de->de_dirent->d_type == DT_DIR)
|
||||
pname = de->de_dirent->d_name;
|
||||
else
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user