Lines Matching refs:pFile
654 FILE* pFile; in partitionRead() local
659 pFile = g_pPartitionFiles[nPartitionID]; in partitionRead()
661 if (pFile == NULL) in partitionRead()
667 if (fseek(pFile, nSectorIndex*g_nSectorSize, SEEK_SET) != 0) in partitionRead()
675 pFile) != 1) in partitionRead()
677 if (feof(pFile)) in partitionRead()
698 FILE* pFile; in partitionWrite() local
703 pFile = g_pPartitionFiles[nPartitionID]; in partitionWrite()
705 if (pFile == NULL) in partitionWrite()
711 if (fseek(pFile, nSectorIndex*g_nSectorSize, SEEK_SET) != 0) in partitionWrite()
719 pFile) != 1) in partitionWrite()
736 FILE* pFile; in partitionSetSize() local
739 pFile = g_pPartitionFiles[nPartitionID]; in partitionSetSize()
741 if (pFile==NULL) in partitionSetSize()
748 if (fseek(pFile, 0, SEEK_END) != 0) in partitionSetSize()
753 nCurrentSectorCount = ftell(pFile) / g_nSectorSize; in partitionSetSize()
766 if (fputc(0xA5, pFile)!=0xA5) in partitionSetSize()
778 result = ftruncate(fileno(pFile),nNewSectorCount * g_nSectorSize); in partitionSetSize()
784 result = _chsize(_fileno(pFile),nNewSectorCount * g_nSectorSize); in partitionSetSize()
804 FILE* pFile = g_pPartitionFiles[nPartitionID]; in partitionSync() local
806 if (pFile == NULL) in partitionSync()
814 result=fflush(pFile); in partitionSync()
823 result=fdatasync(fileno(pFile)); in partitionSync()
826 result=fsync(fileno(pFile)); in partitionSync()
829 result=_commit(_fileno(pFile)); in partitionSync()