/device/google/coral/dumpstate/ |
D | DumpstateDevice.cpp | 73 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 109 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 252 static void DumpTouch(int fd) { in DumpTouch() argument 259 DumpFileToFd(fd, "STM touch firmware version", cmd); in DumpTouch() 263 DumpFileToFd(fd, "STM touch status", cmd); in DumpTouch() 269 RunCommandToFd(fd, "Mutual Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 275 RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 281 RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 285 RunCommandToFd(fd, "Mutual Raw Data", in DumpTouch() 289 RunCommandToFd(fd, "Mutual Baseline Data", in DumpTouch() [all …]
|
/device/google/bramble/dumpstate/ |
D | DumpstateDevice.cpp | 70 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 106 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 263 static void DumpTouch(int fd) { in DumpTouch() argument 270 DumpFileToFd(fd, "STM touch firmware version", cmd); in DumpTouch() 274 DumpFileToFd(fd, "STM touch status", cmd); in DumpTouch() 280 RunCommandToFd(fd, "Mutual Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 286 RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 292 RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 296 RunCommandToFd(fd, "Mutual Raw Data", in DumpTouch() 300 RunCommandToFd(fd, "Mutual Baseline Data", in DumpTouch() [all …]
|
/device/google/bonito/dumpstate/ |
D | DumpstateDevice.cpp | 68 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 104 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 246 static void DumpIPCTRT(int fd) { in DumpIPCTRT() argument 247 DumpFileToFd(fd, "MPSS IPCRTR Log", "/sys/kernel/debug/ipc_logging/mpss_IPCRTR/log"); in DumpIPCTRT() 248 DumpFileToFd(fd, "Local IPCRTR Log", "/sys/kernel/debug/ipc_logging/local_IPCRTR/log"); in DumpIPCTRT() 251 static void DumpTouch(int fd) { in DumpTouch() argument 254 DumpFileToFd(fd, "Synaptics touch firmware version", in DumpTouch() 256 DumpFileToFd(fd, "Synaptics touch config version", in DumpTouch() 258 RunCommandToFd(fd, "keep touch stay awake", in DumpTouch() 261 DumpFileToFd(fd, "Synaptics touch noise information", in DumpTouch() [all …]
|
/device/google/crosshatch/dumpstate/ |
D | DumpstateDevice.cpp | 70 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 106 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 247 static void DumpTouch(int fd) { in DumpTouch() argument 249 DumpFileToFd(fd, "LSI touch firmware version", in DumpTouch() 251 DumpFileToFd(fd, "LSI touch status", in DumpTouch() 253 RunCommandToFd(fd, "Mutual Raw Data", in DumpTouch() 257 RunCommandToFd(fd, "Mutual Raw Cap", in DumpTouch() 261 RunCommandToFd(fd, "Mutual Strength", in DumpTouch() 265 RunCommandToFd(fd, "Self Raw", in DumpTouch() 269 RunCommandToFd(fd, "Self Strength", in DumpTouch() [all …]
|
/device/google/sunfish/dumpstate/ |
D | DumpstateDevice.cpp | 71 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 107 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 258 static void DumpTouch(int fd) { in DumpTouch() argument 262 RunCommandToFd(fd, "Force Set AP as Bus Owner", in DumpTouch() 270 DumpFileToFd(fd, "STM touch firmware version", cmd); in DumpTouch() 274 DumpFileToFd(fd, "STM touch status", cmd); in DumpTouch() 280 RunCommandToFd(fd, "Mutual Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 286 RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 292 RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 296 RunCommandToFd(fd, "Lock Normal Active Mode", in DumpTouch() [all …]
|
/device/google/redfin/dumpstate/ |
D | DumpstateDevice.cpp | 70 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 106 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 257 static void DumpTouch(int fd) { in DumpTouch() argument 267 RunCommandToFd(fd, "Force Touch Active", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 274 RunCommandToFd(fd, "Print Format", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 278 DumpFileToFd(fd, "LSI firmware version", cmd); in DumpTouch() 282 DumpFileToFd(fd, "LSI touch status", cmd); in DumpTouch() 289 RunCommandToFd(fd, "Calibration info", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 296 RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 303 RunCommandToFd(fd, "Self Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() [all …]
|
/device/google/barbet/dumpstate/ |
D | DumpstateDevice.cpp | 76 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument 112 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs() 390 static void DumpTouch(int fd) { in DumpTouch() argument 397 DumpFileToFd(fd, "STM touch firmware version", cmd); in DumpTouch() 401 DumpFileToFd(fd, "STM touch status", cmd); in DumpTouch() 407 RunCommandToFd(fd, "Mutual Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 413 RunCommandToFd(fd, "Mutual Strength", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 419 RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd}); in DumpTouch() 423 RunCommandToFd(fd, "Mutual Raw Data", in DumpTouch() 427 RunCommandToFd(fd, "Mutual Baseline Data", in DumpTouch() [all …]
|
/device/generic/goldfish/tnc/ |
D | main.cpp | 41 int fd = -1; in runClient() local 43 fd = ::socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol); in runClient() 44 if (fd < 0) { in runClient() 47 if (::connect(fd, addr->ai_addr, addr->ai_addrlen) == 0) { in runClient() 50 ::close(fd); in runClient() 53 if (fd < 0) { in runClient() 57 if (::send(fd, "boop", 4, 0) != 4) { in runClient() 58 ::close(fd); in runClient() 62 ::close(fd); in runClient() 67 int fd = -1; in runServer() local [all …]
|
/device/google/cuttlefish/common/libs/fs/ |
D | shared_buf.cc | 33 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size) { in WriteAll() argument 36 while ((written = fd->Write((void*)&(buf[total_written]), size - total_written)) > 0) { in WriteAll() 38 errno = fd->GetErrno(); in WriteAll() 49 ssize_t ReadExact(SharedFD fd, char* buf, size_t size) { in ReadExact() argument 52 while ((read = fd->Read((void*)&(buf[total_read]), size - total_read)) > 0) { in ReadExact() 54 errno = fd->GetErrno(); in ReadExact() 65 ssize_t ReadAll(SharedFD fd, std::string* buf) { in ReadAll() argument 69 while ((read = fd->Read(buff, BUFF_SIZE - 1)) > 0) { in ReadAll() 74 errno = fd->GetErrno(); in ReadAll() 81 ssize_t ReadExact(SharedFD fd, std::string* buf) { in ReadExact() argument [all …]
|
D | shared_buf.h | 33 ssize_t ReadAll(SharedFD fd, std::string* buf); 43 ssize_t ReadExact(SharedFD fd, std::string* buf); 53 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf); 63 ssize_t ReadExact(SharedFD fd, char* buf, size_t size); 74 ssize_t ReadExactBinary(SharedFD fd, T* binary_data) { in ReadExactBinary() argument 75 return ReadExact(fd, (char*) binary_data, sizeof(*binary_data)); in ReadExactBinary() 86 ssize_t WriteAll(SharedFD fd, const std::string& buf); 96 ssize_t WriteAll(SharedFD fd, const std::vector<char>& buf); 106 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size); 117 ssize_t WriteAllBinary(SharedFD fd, const T* binary_data) { in WriteAllBinary() argument [all …]
|
/device/google/sunfish/vibrator/common/ |
D | HardwareBase.cpp | 44 void HwApiBase::debug(int fd) { in debug() argument 45 dprintf(fd, "Kernel:\n"); in debug() 52 dprintf(fd, " %s:\n", path.c_str()); in debug() 54 dprintf(fd, " %s\n", line.c_str()); in debug() 59 dprintf(fd, " Records:\n"); in debug() 64 dprintf(fd, " %s\n", r->toString(mNames).c_str()); in debug() 93 void HwCalBase::debug(int fd) { in debug() argument 99 int fd; in debug() member 100 } context{this, fd}; in debug() 102 dprintf(fd, "Properties:\n"); in debug() [all …]
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/_io/ |
D | fileio.c | 53 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/ |
D | SysCalls.c | 56 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/ |
D | fileio.c | 47 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/ |
D | random.c | 167 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/ |
D | xf-fio.c | 68 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/generic/goldfish/sensors/ |
D | multihal_sensors_epoll.cpp | 24 int epollCtlAdd(int epollFd, int fd) { in epollCtlAdd() argument 27 ev.data.fd = fd; in epollCtlAdd() 28 return TEMP_FAILURE_RETRY(epoll_ctl(epollFd, EPOLL_CTL_ADD, fd, &ev)); in epollCtlAdd() 31 int qemuSensortThreadRcvCommand(const int fd) { in qemuSensortThreadRcvCommand() argument 33 if (TEMP_FAILURE_RETRY(read(fd, &buf, 1)) == 1) { in qemuSensortThreadRcvCommand() 67 const int fd = ev->data.fd; in qemuSensorListenerThread() local 70 if (fd == m_qemuSensorsFd.get()) { in qemuSensorListenerThread() 78 } else if (fd == m_sensorThreadFd.get()) { in qemuSensorListenerThread() 84 const int cmd = qemuSensortThreadRcvCommand(fd); in qemuSensorListenerThread()
|
/device/google/cuttlefish/guest/hals/gps/ |
D | gps_thread.h | 44 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/amlogic/yukawa/lights/ |
D | lights.cpp | 67 static int sys_write_int(int fd, int value) { in sys_write_int() argument 74 amount = write(fd, buffer, bytes); in sys_write_int() 78 static int write8reg8(int fd, uint8_t regaddr, uint8_t cmd) { in write8reg8() argument 83 if (write(fd, buf, 2) != 2) return -1; in write8reg8() 107 int const fd = open(path, O_RDWR); in writeLedArray() local 108 if (fd < 0) { in writeLedArray() 110 return fd; in writeLedArray() 112 if (ioctl(fd, I2C_SLAVE, i2c_dev_addr) < 0) { in writeLedArray() 114 close(fd); in writeLedArray() 118 write8reg8(fd, addr.red, ((color >> 16) & 0xFF)); in writeLedArray() [all …]
|
/device/linaro/bootloader/edk2/StdLib/LibC/Stdio/ |
D | tmpfile.c | 65 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/google/crosshatch/gpt-utils/ |
D | gpt-utils.cpp | 145 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/coral/gpt-utils/ |
D | gpt-utils.cpp | 145 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() 165 r = fsync(fd); in blk_rw() 289 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument 303 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain() 315 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain() 324 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain() 344 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain() [all …]
|
/device/google/bonito/gpt-utils/ |
D | gpt-utils.cpp | 145 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/redbull/gpt-utils/ |
D | gpt-utils.cpp | 145 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() 165 r = fsync(fd); in blk_rw() 289 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument 303 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain() 315 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain() 324 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain() 344 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain() [all …]
|
/device/google/sunfish/gpt-utils/ |
D | gpt-utils.cpp | 145 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() 165 r = fsync(fd); in blk_rw() 289 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument 303 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain() 315 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain() 324 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain() 344 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain() [all …]
|