Lines Matching refs:control
317 auto control = IncFs_CreateControl(cmd.get(), pendingReads.get(), logs.get()); in makeControl() local
318 if (control) { in makeControl()
323 return control; in makeControl()
466 auto control = makeControl(targetDir); in IncFs_Mount() local
467 if (control == nullptr) { in IncFs_Mount()
470 return control; in IncFs_Mount()
482 IncFsFd IncFs_GetControlFd(const IncFsControl* control, IncFsFdType type) { in IncFs_GetControlFd() argument
483 if (!control) { in IncFs_GetControlFd()
488 return control->cmd; in IncFs_GetControlFd()
490 return control->pendingReads; in IncFs_GetControlFd()
492 return control->logs; in IncFs_GetControlFd()
498 IncFsSize IncFs_ReleaseControlFds(IncFsControl* control, IncFsFd out[], IncFsSize outSize) { in IncFs_ReleaseControlFds() argument
499 if (!control || !out) { in IncFs_ReleaseControlFds()
505 out[CMD] = std::exchange(control->cmd, -1); in IncFs_ReleaseControlFds()
506 out[PENDING_READS] = std::exchange(control->pendingReads, -1); in IncFs_ReleaseControlFds()
507 out[LOGS] = std::exchange(control->logs, -1); in IncFs_ReleaseControlFds()
515 void IncFs_DeleteControl(IncFsControl* control) { in IncFs_DeleteControl() argument
516 if (control) { in IncFs_DeleteControl()
517 if (control->cmd >= 0) { in IncFs_DeleteControl()
518 close(control->cmd); in IncFs_DeleteControl()
520 if (control->pendingReads >= 0) { in IncFs_DeleteControl()
521 close(control->pendingReads); in IncFs_DeleteControl()
523 if (control->logs >= 0) { in IncFs_DeleteControl()
524 close(control->logs); in IncFs_DeleteControl()
526 delete control; in IncFs_DeleteControl()
530 IncFsErrorCode IncFs_SetOptions(const IncFsControl* control, IncFsMountOptions options) { in IncFs_SetOptions() argument
531 if (!control) { in IncFs_SetOptions()
534 auto root = rootForCmd(control->cmd); in IncFs_SetOptions()
548 IncFsErrorCode IncFs_Root(const IncFsControl* control, char buffer[], size_t* bufferSize) { in IncFs_Root() argument
549 if (!control) { in IncFs_Root()
552 std::string result = rootForCmd(control->cmd); in IncFs_Root()
653 IncFsErrorCode IncFs_MakeFile(const IncFsControl* control, const char* path, int32_t mode, in IncFs_MakeFile() argument
655 if (!control) { in IncFs_MakeFile()
688 if (::ioctl(control->cmd, INCFS_IOC_CREATE_FILE, &args)) { in IncFs_MakeFile()
735 IncFsErrorCode IncFs_MakeDir(const IncFsControl* control, const char* path, int32_t mode) { in IncFs_MakeDir() argument
736 if (!control) { in IncFs_MakeDir()
739 const auto root = rootForCmd(control->cmd); in IncFs_MakeDir()
756 IncFsErrorCode IncFs_MakeDirs(const IncFsControl* control, const char* path, int32_t mode) { in IncFs_MakeDirs() argument
757 if (!control) { in IncFs_MakeDirs()
760 const auto root = rootForCmd(control->cmd); in IncFs_MakeDirs()
789 IncFsErrorCode IncFs_GetMetadataById(const IncFsControl* control, IncFsFileId fileId, char buffer[], in IncFs_GetMetadataById() argument
791 if (!control) { in IncFs_GetMetadataById()
795 const auto root = rootForCmd(control->cmd); in IncFs_GetMetadataById()
803 IncFsErrorCode IncFs_GetMetadataByPath(const IncFsControl* control, const char* path, char buffer[], in IncFs_GetMetadataByPath() argument
805 if (!control) { in IncFs_GetMetadataByPath()
809 const auto root = rootForCmd(control->cmd); in IncFs_GetMetadataByPath()
817 IncFsFileId IncFs_GetId(const IncFsControl* control, const char* path) { in IncFs_GetId() argument
818 if (!control) { in IncFs_GetId()
822 const auto root = rootForCmd(control->cmd); in IncFs_GetId()
852 IncFsErrorCode IncFs_GetSignatureById(const IncFsControl* control, IncFsFileId fileId, in IncFs_GetSignatureById() argument
854 if (!control) { in IncFs_GetSignatureById()
858 const auto root = rootForCmd(control->cmd); in IncFs_GetSignatureById()
870 IncFsErrorCode IncFs_GetSignatureByPath(const IncFsControl* control, const char* path, in IncFs_GetSignatureByPath() argument
872 if (!control) { in IncFs_GetSignatureByPath()
877 const auto root = rootForCmd(control->cmd); in IncFs_GetSignatureByPath()
895 IncFsErrorCode IncFs_Link(const IncFsControl* control, const char* fromPath, in IncFs_Link() argument
897 if (!control) { in IncFs_Link()
901 auto root = rootForCmd(control->cmd); in IncFs_Link()
919 IncFsErrorCode IncFs_Unlink(const IncFsControl* control, const char* path) { in IncFs_Unlink() argument
920 if (!control) { in IncFs_Unlink()
924 auto root = rootForCmd(control->cmd); in IncFs_Unlink()
992 IncFsErrorCode IncFs_WaitForPendingReads(const IncFsControl* control, int32_t timeoutMs, in IncFs_WaitForPendingReads() argument
994 if (!control || control->pendingReads < 0) { in IncFs_WaitForPendingReads()
1001 waitForReads(control->pendingReads, timeoutMs, pendingReads.data(), bufferSize)) { in IncFs_WaitForPendingReads()
1015 IncFsErrorCode IncFs_WaitForPageReads(const IncFsControl* control, int32_t timeoutMs, in IncFs_WaitForPageReads() argument
1017 if (!control) { in IncFs_WaitForPageReads()
1021 auto logsFd = control->logs; in IncFs_WaitForPageReads()
1054 IncFsFd IncFs_OpenForSpecialOpsByPath(const IncFsControl* control, const char* path) { in IncFs_OpenForSpecialOpsByPath() argument
1055 if (!control) { in IncFs_OpenForSpecialOpsByPath()
1060 const auto cmd = control->cmd; in IncFs_OpenForSpecialOpsByPath()
1068 IncFsFd IncFs_OpenForSpecialOpsById(const IncFsControl* control, IncFsFileId id) { in IncFs_OpenForSpecialOpsById() argument
1069 if (!control) { in IncFs_OpenForSpecialOpsById()
1073 const auto cmd = control->cmd; in IncFs_OpenForSpecialOpsById()