!149 VfsProcfsOpen实现存在问题,没有调用具体procfs节点的存在的open函数

Merge pull request !149 from zhangfanfan2/master
This commit is contained in:
openharmony_ci 2021-04-17 12:05:35 +08:00 committed by Gitee
commit 9920e359f8
1 changed files with 7 additions and 0 deletions

View File

@ -235,6 +235,13 @@ int VfsProcfsOpen(struct file *filep)
if (ProcOpen(pde->pf) != OK) {
return -ENOMEM;
}
if (S_ISREG(pde->mode) && (pde->procFileOps != NULL) && (pde->procFileOps->open != NULL)) {
(void)pde->procFileOps->open((struct Vnode *)pde, pde->pf);
}
if (S_ISDIR(pde->mode)) {
pde->pdirCurrent = pde->subdir;
pde->pf->fPos = 0;
}
filep->f_priv = (void *)pde;
return LOS_OK;
}