解决issueI3J6PP

This commit is contained in:
zhangfanfan2 2021-04-16 18:51:09 +08:00 committed by Gitee
parent 098da53afe
commit 78e1fdb971
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;
}