• Home
  • Raw
  • Download

Lines Matching refs:pde

372     struct ProcDirEntry *pde = NULL;  in CreateProcEntry()  local
375 pde = ProcCreateDir(parent, name, NULL, mode); in CreateProcEntry()
377 pde = ProcCreateFile(parent, name, NULL, mode); in CreateProcEntry()
379 return pde; in CreateProcEntry()
483 struct ProcDirEntry *pde = CreateProcEntry(name, mode, parent); in ProcCreateData() local
484 if (pde != NULL) { in ProcCreateData()
486 pde->procFileOps = procFileOps; in ProcCreateData()
489 pde->data = param->data; in ProcCreateData()
490 pde->dataType = param->dataType; in ProcCreateData()
493 return pde; in ProcCreateData()
559 static int ProcRead(struct ProcDirEntry *pde, char *buf, size_t len) in ProcRead() argument
561 if (pde == NULL || pde->pf == NULL) { in ProcRead()
564 struct ProcFile *procFile = pde->pf; in ProcRead()
569 if (pde->procFileOps->read(sb, pde->data) != 0) { in ProcRead()
619 int ReadProcFile(struct ProcDirEntry *pde, void *buf, size_t len) in ReadProcFile() argument
623 if (pde == NULL) { in ReadProcFile()
626 if (S_ISREG(pde->mode)) { in ReadProcFile()
627 if ((pde->procFileOps != NULL) && (pde->procFileOps->read != NULL)) { in ReadProcFile()
628 result = ProcRead(pde, (char *)buf, len); in ReadProcFile()
630 } else if (S_ISDIR(pde->mode)) { in ReadProcFile()
631 result = GetNextDir(pde, buf, len); in ReadProcFile()
636 int WriteProcFile(struct ProcDirEntry *pde, const void *buf, size_t len) in WriteProcFile() argument
640 if (pde == NULL) { in WriteProcFile()
644 if (S_ISDIR(pde->mode)) { in WriteProcFile()
649 if ((pde->procFileOps != NULL) && (pde->procFileOps->write != NULL)) { in WriteProcFile()
650 result = pde->procFileOps->write(pde->pf, (const char *)buf, len, &(pde->pf->fPos)); in WriteProcFile()
656 loff_t LseekProcFile(struct ProcDirEntry *pde, loff_t offset, int whence) in LseekProcFile() argument
658 if (pde == NULL || pde->pf == NULL) { in LseekProcFile()
662 struct ProcFile *procFile = pde->pf; in LseekProcFile()
686 int LseekDirProcFile(struct ProcDirEntry *pde, off_t *pos, int whence) in LseekDirProcFile() argument
692 pde->pdirCurrent = pde->subdir; in LseekDirProcFile()
693 pde->pf->fPos = 0; in LseekDirProcFile()
697 int CloseProcFile(struct ProcDirEntry *pde) in CloseProcFile() argument
701 if (pde == NULL) { in CloseProcFile()
704 pde->pf->fPos = 0; in CloseProcFile()
705 atomic_set(&pde->count, 1); in CloseProcFile()
706 if (S_ISDIR(pde->mode)) { in CloseProcFile()
707 pde->pdirCurrent = pde->subdir; in CloseProcFile()
710 if ((pde->procFileOps != NULL) && (pde->procFileOps->release != NULL)) { in CloseProcFile()
711 result = pde->procFileOps->release((struct Vnode *)pde, pde->pf); in CloseProcFile()
713 LosBufRelease(pde->pf->sbuf); in CloseProcFile()
714 pde->pf->sbuf = NULL; in CloseProcFile()
716 if (pde->parent == NULL) { in CloseProcFile()
717 FreeProcEntry(pde); in CloseProcFile()