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
4f19a2bf30
commit
f2970382f1
@ -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