Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 533) sorted by relevance

12345678910>>...22

/device/google/crosshatch/dumpstate/
DDumpstateDevice.cpp64 void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument
100 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs()
110 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
128 …RunCommandToFd(fd, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, Command… in dumpModem()
131 …RunCommandToFd(fd, "MODEM RFS INFO", {"/vendor/bin/find /data/vendor/rfs/mpss/OEMFI/"}, CommandOpt… in dumpModem()
132 …RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", {"/vendor/bin/getprop | grep vendor.sys.modem.d… in dumpModem()
163 …RunCommandToFd(fd, "SMLOG DUMP", {"smlog_dump", "-d", "-o", modemLogAllDir.c_str()}, CommandOption… in dumpModem()
179 …dumpLogs(fd, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT… in dumpModem()
188 …dumpLogs(fd, tcpdumpLogDir, modemLogAllDir, android::base::GetIntProperty(TCPDUMP_NUMBER_BUGREPORT… in dumpModem()
192 …RunCommandToFd(fd, "CP MODEM LOG", {"/vendor/bin/cp", logFile.c_str(), modemLogAllDir.c_str()}, Co… in dumpModem()
[all …]
/device/google/bonito/dumpstate/
DDumpstateDevice.cpp64 void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument
100 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs()
110 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
128 …RunCommandToFd(fd, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, Command… in dumpModem()
131 …RunCommandToFd(fd, "MODEM RFS INFO", {"/vendor/bin/find /data/vendor/rfs/mpss/OEMFI/"}, CommandOpt… in dumpModem()
132 …RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", {"/vendor/bin/getprop | grep vendor.sys.modem.d… in dumpModem()
166 …RunCommandToFd(fd, "SMLOG DUMP", {"smlog_dump", "-d", "-o", modemLogAllDir.c_str()}, CommandOption… in dumpModem()
187 …dumpLogs(fd, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT… in dumpModem()
196 …dumpLogs(fd, tcpdumpLogDir, modemLogAllDir, android::base::GetIntProperty(TCPDUMP_NUMBER_BUGREPORT… in dumpModem()
200 …RunCommandToFd(fd, "CP MODEM LOG", {"/vendor/bin/cp", logFile.c_str(), modemLogAllDir.c_str()}, Co… in dumpModem()
[all …]
/device/google/wahoo/dumpstate/
DDumpstateDevice.cpp57 void DumpstateDevice::dumpDiagLogs(int fd, std::string srcDir, std::string destDir) { in dumpDiagLogs() argument
93 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpDiagLogs()
103 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
115 RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", in dumpModem()
132 …RunCommandToFd(fd, "MKDIR MODEM LOG", { "/vendor/bin/sh", "-c", modemLogMkDirCmd.c_str()}, options… in dumpModem()
140 … RunCommandToFd(fd, "SMLOG DUMP", { "smlog_dump", "-d", "-o", modemLogAllDir.c_str() }, options); in dumpModem()
161 dumpDiagLogs(fd, diagLogDir, modemLogAllDir); in dumpModem()
172 … RunCommandToFd(fd, "CP MODEM LOG", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpModem()
180 … RunCommandToFd(fd, "TAR LOG", { "/vendor/bin/sh", "-c", modemLogTarCmd.c_str()}, options); in dumpModem()
183 … RunCommandToFd(fd, "CHG PERM", { "/vendor/bin/sh", "-c", modemLogPermCmd.c_str()}, options); in dumpModem()
[all …]
/device/google/marlin/dumpstate/
DDumpstateDevice.cpp48 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
72 …RunCommandToFd(fd, "MKDIR MODEM LOG", { "/vendor/bin/sh", "-c", modemLogMkDirCmd.c_str()}, options… in dumpModem()
73 … RunCommandToFd(fd, "SMLOG DUMP", { "smlog_dump", "-d", "-o", modemLogAllDir.c_str() }, options); in dumpModem()
77 … RunCommandToFd(fd, "MV MODEM LOG", { "/vendor/bin/sh", "-c", copyCmd.c_str()}, options); in dumpModem()
83 … RunCommandToFd(fd, "TAR LOG", { "/vendor/bin/sh", "-c", modemLogTarCmd.c_str()}, options); in dumpModem()
85 … RunCommandToFd(fd, "CHG PERM", { "/vendor/bin/sh", "-c", modemLogPermCmd.c_str()}, options); in dumpModem()
111 … RunCommandToFd(fd, "RM MODEM DIR", { "/vendor/bin/sh", "-c", modemLogClearCmd.c_str()}, options); in dumpModem()
112 … RunCommandToFd(fd, "RM LOG", { "/vendor/bin/rm", modemLogCombined.c_str()}, options); in dumpModem()
130 int fd = handle->data[0]; in dumpstateBoard() local
131 if (fd < 0) { in dumpstateBoard()
[all …]
/device/generic/goldfish/vibrator/
Dqemu.c55 qemu_fd_write( int fd, const char* cmd, int len ) in qemu_fd_write() argument
59 len2 = write(fd, cmd, len); in qemu_fd_write()
65 qemu_fd_read( int fd, char* buff, int len ) in qemu_fd_read() argument
69 len2 = read(fd, buff, len); in qemu_fd_read()
78 int fd; in qemu_channel_open_qemud_pipe() local
82 fd = qemu_pipe_open(pipe_name); in qemu_channel_open_qemud_pipe()
83 if (fd < 0) { in qemu_channel_open_qemud_pipe()
89 channel->fd = fd; in qemu_channel_open_qemud_pipe()
97 int fd, ret, namelen = strlen(name); in qemu_channel_open_qemud() local
100 fd = socket_local_client( "qemud", in qemu_channel_open_qemud()
[all …]
/device/generic/goldfish/include/
Dqemud.h47 int fd; in qemud_channel_open() local
54 fd = qemu_pipe_open(pipe_name); in qemud_channel_open()
55 D("%s: pipe name %s (name %s) fd %d", __FUNCTION__, pipe_name, name, fd); in qemud_channel_open()
56 if (fd < 0) { in qemud_channel_open()
59 fd = socket_local_client( "qemud", in qemud_channel_open()
62 if (fd < 0) { in qemud_channel_open()
68 if (!WriteFully(fd, name, namelen)) { in qemud_channel_open()
71 close(fd); in qemud_channel_open()
76 if (!ReadFully(fd, answer, 2) || in qemud_channel_open()
79 close(fd); in qemud_channel_open()
[all …]
Dqemu_pipe.h33 static bool ReadFully(int fd, void* data, size_t byte_count) { in ReadFully() argument
37 ssize_t n = TEMP_FAILURE_RETRY(read(fd, p, remaining)); in ReadFully()
45 static bool WriteFully(int fd, const void* data, size_t byte_count) { in WriteFully() argument
49 ssize_t n = TEMP_FAILURE_RETRY(write(fd, p, remaining)); in WriteFully()
84 int fd; in qemu_pipe_open() local
93 fd = TEMP_FAILURE_RETRY(open("/dev/qemu_pipe", O_RDWR)); in qemu_pipe_open()
94 if (fd < 0 && errno == ENOENT) in qemu_pipe_open()
95 fd = TEMP_FAILURE_RETRY(open("/dev/goldfish_pipe", O_RDWR)); in qemu_pipe_open()
96 if (fd < 0) { in qemu_pipe_open()
104 if (!WriteFully(fd, buff, buffLen + 1)) { in qemu_pipe_open()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/_io/
Dfileio.c53 int fd; member
69 return ((fileio *)self)->fd < 0; in _PyFileIO_closed()
73 portable_lseek(int fd, PyObject *posobj, int whence);
75 static PyObject *portable_lseek(int fd, PyObject *posobj, int whence);
83 if (self->fd >= 0) { in internal_close()
84 int fd = self->fd; in internal_close() local
85 self->fd = -1; in internal_close()
87 if (_PyVerify_fd(fd)) { in internal_close()
89 err = close(fd); in internal_close()
110 self->fd = -1; in fileio_close()
[all …]
/device/linaro/bootloader/edk2/StdLib/LibC/Uefi/
DSysCalls.c56 ValidateFD( int fd, int IsOpen) in ValidateFD() argument
61 if((fd >= 0) && (fd < OPEN_MAX)) { in ValidateFD()
62 filp = &gMD->fdarray[fd]; in ValidateFD()
88 int fd = -1; in FindFreeFD() local
96 fd = i; in FindFreeFD()
100 return fd; in FindFreeFD()
105 DeleteOnClose(int fd) in DeleteOnClose() argument
109 if(ValidateFD( fd, VALID_OPEN)) { in DeleteOnClose()
110 gMD->fdarray[fd].f_iflags |= FIF_DELCLOSE; in DeleteOnClose()
129 isatty (int fd) in isatty() argument
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/_io/
Dfileio.c47 int fd; member
64 return ((fileio *)self)->fd < 0; in _PyFileIO_closed()
68 portable_lseek(int fd, PyObject *posobj, int whence);
70 static PyObject *portable_lseek(int fd, PyObject *posobj, int whence);
78 if (self->fd >= 0) { in internal_close()
79 int fd = self->fd; in internal_close() local
80 self->fd = -1; in internal_close()
82 if (_PyVerify_fd(fd)) { in internal_close()
84 err = close(fd); in internal_close()
108 self->fd = -1; in fileio_close()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Python/
Drandom.c167 int fd; member
181 int fd; in dev_urandom_noraise() local
186 fd = open("/dev/urandom", O_RDONLY, 0); in dev_urandom_noraise()
187 if (fd < 0) in dev_urandom_noraise()
193 n = read(fd, buffer, (size_t)size); in dev_urandom_noraise()
204 close(fd); in dev_urandom_noraise()
212 int fd; in dev_urandom_python() local
220 if (urandom_cache.fd >= 0) { in dev_urandom_python()
222 if (fstat(urandom_cache.fd, &st) in dev_urandom_python()
234 urandom_cache.fd = -1; in dev_urandom_python()
[all …]
/device/linaro/hikey/hifi/xaf/host-apf/proxy/
Dxf-fio.c68 int fd = ipc->fd; in xf_ipc_send() local
74 XF_CHK_ERR(write(fd, msg, sizeof(*msg)) == sizeof(*msg), -errno); in xf_ipc_send()
76 …ret = ioctl(fd, HIFI_MISC_IOCTL_XAF_IPC_MSG_SEND, msg);// GJB:-Verify th return value with driver … in xf_ipc_send()
86 int fd = ipc->fd; in xf_ipc_wait() local
92 FD_SET(fd, &rfds); in xf_ipc_wait()
99 select(fd+1,&rfds,NULL,NULL,(timeout? &tv: NULL)); in xf_ipc_wait()
102 return (FD_ISSET(fd, &rfds) ? 0 : -ETIMEDOUT); in xf_ipc_wait()
108 int fd = ipc->fd; in xf_ipc_recv() local
113 if ((r = read(fd, msg, sizeof(*msg))) == sizeof(*msg)) in xf_ipc_recv()
124 if ((r = ioctl(fd, HIFI_MISC_IOCTL_XAF_IPC_MSG_RECV, &temp)) == sizeof(temp)) in xf_ipc_recv()
[all …]
/device/google/cuttlefish_common/guest/hals/gps/
Dgps_thread.h44 int fd; member
59 static inline int epoll_register(int epoll_fd, int fd) { in epoll_register() argument
60 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); in epoll_register()
64 ev.data.fd = fd; in epoll_register()
68 ret = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev); in epoll_register()
73 static inline int epoll_deregister(int epoll_fd, int fd) { in epoll_deregister() argument
76 ret = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, NULL); in epoll_deregister()
/device/google/bonito/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/google/crosshatch/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/google/marlin/recovery/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/google/cuttlefish_common/host/commands/virtual_usb_manager/vadb/
Dusb_cmd_data_transfer.cpp34 bool USBCmdDataTransfer::OnRequest(const cvd::SharedFD& fd) { in OnRequest() argument
35 if (fd->Write(&req_, sizeof(req_)) != sizeof(req_)) { in OnRequest()
36 LOG(ERROR) << "Short write: " << fd->StrError(); in OnRequest()
41 if (static_cast<size_t>(fd->Write(data_.data(), data_.size())) != in OnRequest()
43 LOG(ERROR) << "Short write: " << fd->StrError(); in OnRequest()
51 bool USBCmdDataTransfer::OnResponse(bool is_success, const cvd::SharedFD& fd) { in OnResponse() argument
59 if (fd->Read(&len, sizeof(len)) != sizeof(len)) { in OnResponse()
60 LOG(ERROR) << "Short read: " << fd->StrError(); in OnResponse()
70 auto packetsize = fd->Read(&data_[got], len - got); in OnResponse()
73 if (fd->GetErrno() != 0) { in OnResponse()
[all …]
Dusb_cmd_control_transfer.cpp36 bool USBCmdControlTransfer::OnRequest(const cvd::SharedFD& fd) { in OnRequest() argument
37 if (fd->Write(&req_, sizeof(req_)) != sizeof(req_)) { in OnRequest()
38 LOG(ERROR) << "Short write: " << fd->StrError(); in OnRequest()
44 if (static_cast<size_t>(fd->Write(data_.data(), data_.size())) != in OnRequest()
46 LOG(ERROR) << "Short write: " << fd->StrError(); in OnRequest()
56 const cvd::SharedFD& fd) { in OnResponse() argument
64 if (fd->Read(&len, sizeof(len)) != sizeof(len)) { in OnResponse()
65 LOG(ERROR) << "Short read: " << fd->StrError(); in OnResponse()
72 if (fd->Read(data_.data(), len) != len) { in OnResponse()
73 LOG(ERROR) << "Short read: " << fd->StrError(); in OnResponse()
/device/linaro/bootloader/edk2/StdLib/LibC/Stdio/
Dtmpfile.c65 int fd, sverrno; in tmpfile() local
74 fd = mkstemp(buf); in tmpfile()
75 if (fd != -1) { in tmpfile()
79 (void)DeleteOnClose(fd); in tmpfile()
84 if (fd == -1) in tmpfile()
87 if ((fp = fdopen(fd, "w+")) == NULL) { in tmpfile()
89 (void)close(fd); in tmpfile()
/device/generic/goldfish/network/netmgr/
Dpoller.cpp95 pollables[fds[i].fd] = pollable; in run()
115 for (const auto& fd : fds) { in run() local
116 if ((fd.revents & (POLLIN | POLLHUP)) == 0) { in run()
120 auto pollable = pollables.find(fd.fd); in run()
123 LOGE("Poller could not find fd matching %d", fd.fd); in run()
126 if (fd.revents & POLLIN) { in run()
129 if (!pollable->second->onReadAvailable(fd.fd, &status)) { in run()
134 if (fd.revents & POLLHUP) { in run()
137 if (!pollable->second->onClose(fd.fd, &status)) { in run()
/device/generic/goldfish/wifi/wifi_hal/
Dnetlink.cpp33 static void closeIfOpen(int* fd) { in closeIfOpen() argument
34 if (*fd != -1) { in closeIfOpen()
35 ::close(*fd); in closeIfOpen()
36 *fd = -1; in closeIfOpen()
100 fds[0].fd = mSocket; in eventLoop()
102 fds[1].fd = mControlPipe[kControlRead]; in eventLoop()
118 for (auto& fd : fds) { in eventLoop() local
119 if ((fd.revents & POLLIN) == 0) { in eventLoop()
122 if (fd.fd == mSocket) { in eventLoop()
123 readNetlinkMessage(fd.fd); in eventLoop()
[all …]
/device/generic/goldfish-opengl/shared/OpenglCodecCommon/
Dgoldfish_dma.cpp56 res->fd = qemu_pipe_open("opengles"); in goldfish_dma_create_region()
60 if (res->fd > 0) { in goldfish_dma_create_region()
64 int alloc_res = ioctl(res->fd, GOLDFISH_DMA_IOC_CREATE_REGION, &info); in goldfish_dma_create_region()
69 close(res->fd); in goldfish_dma_create_region()
70 res->fd = -1; in goldfish_dma_create_region()
76 __FUNCTION__, sz, res, res->fd); in goldfish_dma_create_region()
80 __FUNCTION__, res->fd, errno); in goldfish_dma_create_region()
86 ALOGV("%s: on fd %d errno=%d", __FUNCTION__, cxt->fd, errno); in goldfish_dma_map()
87 void *mapped = mmap(0, cxt->size, PROT_WRITE, MAP_SHARED, cxt->fd, 0); in goldfish_dma_map()
116 close(cxt->fd); in goldfish_dma_free()
[all …]
/device/google/marlin/camera/QCamera2/stack/mm-camera-test/inc/
Dmm_qcamera_socket.h37 #define __FD_SET(fd, fdsetp) \ argument
38 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1LU<<((fd) & 31)))
41 #define __FD_CLR(fd, fdsetp) \ argument
42 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1LU<<((fd) & 31)))
45 #define __FD_ISSET(fd, fdsetp) \ argument
46 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1LU<<((fd) & 31))) != 0)
/device/linaro/hikey/wpan/uim/
Duim.c88 int read_hci_event(int fd, unsigned char *buf, int size) in read_hci_event() argument
105 rd = read(fd, buf, 1); in read_hci_event()
121 rd = read(fd, buf + count, 3 - count); in read_hci_event()
134 rd = read(fd, buf + count, remain - (count - 3)); in read_hci_event()
149 static int read_command_complete(int fd, unsigned short opcode) in read_command_complete() argument
156 if (read_hci_event(fd, (unsigned char *)&resp, sizeof(resp)) < 0) { in read_command_complete()
288 int ldisc, len, fd, flow_ctrl; in st_uart_config() local
300 fd = open(sysfs_dev_name, O_RDONLY); in st_uart_config()
301 if (fd < 0) { in st_uart_config()
305 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
[all …]
/device/linaro/bootloader/edk2/StdLib/LibC/Uefi/InteractiveIO/
DTerminalFunctions.c143 int fd, in tcgetattr() argument
153 if(ValidateFD( fd, VALID_OPEN)) { in tcgetattr()
154 filp = &gMD->fdarray[fd]; in tcgetattr()
200 int fd, in tcsetattr() argument
211 if(ValidateFD( fd, VALID_OPEN)) { in tcsetattr()
212 filp = &gMD->fdarray[fd]; in tcsetattr()
241 tcdrain (int fd) in tcdrain() argument
261 int fd, in tcflow() argument
279 int fd, in tcflush() argument

12345678910>>...22