Lines Matching refs:FileInstance

113 bool FileInstance::CopyFrom(FileInstance& in, size_t length, FileInstance* stop) {  in CopyFrom()
168 bool FileInstance::CopyAllFrom(FileInstance& in, FileInstance* stop) { in CopyAllFrom()
179 void FileInstance::Close() { in Close()
200 bool FileInstance::Chmod(mode_t mode) { in Chmod()
210 int FileInstance::ConnectWithTimeout(const struct sockaddr* addr, in ConnectWithTimeout()
274 bool FileInstance::IsSet(fd_set* in) const { in IsSet()
282 void FileInstance::Log(const char* message) { in Log()
286 void FileInstance::Log(const char*) {} in Log()
289 void FileInstance::Set(fd_set* dest, int* max_index) const { in Set()
320 FileInstance::Log("select\n"); in Select()
329 other.value_.reset(new FileInstance(-1, EBADF)); in SharedFD()
334 other.value_.reset(new FileInstance(-1, EBADF)); in operator =()
382 SharedFD SharedFD::Accept(const FileInstance& listener, struct sockaddr* addr, in Accept()
385 std::shared_ptr<FileInstance>(listener.Accept(addr, addrlen))); in Accept()
388 SharedFD SharedFD::Accept(const FileInstance& listener) { in Accept()
395 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, error_num))); in Dup()
406 (*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno)); in Pipe()
407 (*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno)); in Pipe()
416 return std::shared_ptr<FileInstance>(new FileInstance(fd, errno)); in Event()
423 return std::shared_ptr<FileInstance>(new FileInstance(fd, error_num)); in MemfdCreate()
445 (*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno)); in SocketPair()
446 (*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno)); in SocketPair()
468 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, errno))); in Open()
470 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, 0))); in Open()
477 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, errno))); in InotifyFd()
512 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, errno))); in Socket()
514 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, 0))); in Socket()
521 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, errno))); in Mkstemp()
523 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, 0))); in Mkstemp()
528 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(-1, error))); in ErrorFD()
814 /* static */ std::shared_ptr<FileInstance> FileInstance::ClosedInstance() { in ClosedInstance()
815 return std::shared_ptr<FileInstance>(new FileInstance(-1, EBADF)); in ClosedInstance()
818 int FileInstance::Bind(const struct sockaddr* addr, socklen_t addrlen) { in Bind()
825 int FileInstance::Connect(const struct sockaddr* addr, socklen_t addrlen) { in Connect()
832 int FileInstance::UNMANAGED_Dup() { in UNMANAGED_Dup()
839 int FileInstance::UNMANAGED_Dup2(int newfd) { in UNMANAGED_Dup2()
846 int FileInstance::Fcntl(int command, int value) { in Fcntl()
853 int FileInstance::Fsync() { in Fsync()
860 Result<void> FileInstance::Flock(int operation) { in Flock()
868 int FileInstance::GetSockName(struct sockaddr* addr, socklen_t* addrlen) { in GetSockName()
878 unsigned int FileInstance::VsockServerPort() { in VsockServerPort()
886 int FileInstance::Ioctl(int request, void* val) { in Ioctl()
893 int FileInstance::LinkAtCwd(const std::string& path) { in LinkAtCwd()
903 int FileInstance::Listen(int backlog) { in Listen()
910 off_t FileInstance::LSeek(off_t offset, int whence) { in LSeek()
917 ssize_t FileInstance::Recv(void* buf, size_t len, int flags) { in Recv()
924 ssize_t FileInstance::RecvMsg(struct msghdr* msg, int flags) { in RecvMsg()
931 ssize_t FileInstance::Read(void* buf, size_t count) { in Read()
939 int FileInstance::EventfdRead(eventfd_t* value) { in EventfdRead()
947 ssize_t FileInstance::Send(const void* buf, size_t len, int flags) { in Send()
954 ssize_t FileInstance::SendMsg(const struct msghdr* msg, int flags) { in SendMsg()
961 int FileInstance::Shutdown(int how) { in Shutdown()
968 int FileInstance::SetSockOpt(int level, int optname, const void* optval, in SetSockOpt()
976 int FileInstance::GetSockOpt(int level, int optname, void* optval, in GetSockOpt()
984 int FileInstance::SetTerminalRaw() { in SetTerminalRaw()
1014 std::string FileInstance::StrError() const { in StrError()
1019 ScopedMMap FileInstance::MMap(void* addr, size_t length, int prot, int flags, in MMap()
1027 ssize_t FileInstance::Truncate(off_t length) { in Truncate()
1034 ssize_t FileInstance::Write(const void* buf, size_t count) { in Write()
1045 int FileInstance::EventfdWrite(eventfd_t value) { in EventfdWrite()
1053 bool FileInstance::IsATTY() { in IsATTY()
1060 int FileInstance::Futimens(const struct timespec times[2]) { in Futimens()
1068 Result<std::string> FileInstance::ProcFdLinkTarget() const { in ProcFdLinkTarget()
1081 int FileInstance::InotifyAddWatch(const std::string& pathname, uint32_t mask) { in InotifyAddWatch()
1085 void FileInstance::InotifyRmWatch(int watch) { in InotifyRmWatch()
1089 FileInstance::FileInstance(int fd, int in_errno) in FileInstance() function in cuttlefish::FileInstance
1099 FileInstance* FileInstance::Accept(struct sockaddr* addr, in Accept()
1103 return new FileInstance(fd, errno); in Accept()
1105 return new FileInstance(fd, 0); in Accept()