/system/bt/osi/test/ |
H A D | reactor_test.cpp | 91 int fd = eventfd(0, 0); local 94 arg.object = reactor_register(reactor, fd, &arg, unregister_cb, NULL); 96 eventfd_write(fd, 1); 100 close(fd); 107 int fd = eventfd(0, 0); local 109 reactor_object_t *object = reactor_register(reactor, fd, NULL, NULL, NULL); 117 close(fd);
|
/system/connectivity/dhcp_client/ |
H A D | device_info.cc | 64 int fd = sockets_->Socket(AF_INET, SOCK_DGRAM, 0); local 65 if (fd == -1) { 70 shill::ScopedSocketCloser socket_closer(sockets_.get(), fd); 72 if (sockets_->Ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) {
|
/system/connectivity/shill/ |
H A D | file_io.cc | 41 ssize_t FileIO::Write(int fd, const void* buf, size_t count) { argument 42 return HANDLE_EINTR(write(fd, buf, count)); 45 ssize_t FileIO::Read(int fd, void* buf, size_t count) { argument 46 return HANDLE_EINTR(read(fd, buf, count)); 49 int FileIO::Close(int fd) { argument 50 return IGNORE_EINTR(close(fd)); 53 int FileIO::SetFdNonBlocking(int fd) { argument 54 const int flags = HANDLE_EINTR(fcntl(fd, F_GETFL)) | O_NONBLOCK; 55 return HANDLE_EINTR(fcntl(fd, F_SETFL, flags));
|
H A D | protobuf_lite_streams.cc | 33 int fd = HANDLE_EINTR(open(file_path.c_str(), O_RDONLY)); local 34 if (fd == -1) { 40 auto* file_stream(new ProtobufLiteCopyingFileInputStream(fd)); 49 ProtobufLiteCopyingFileInputStream::ProtobufLiteCopyingFileInputStream(int fd) argument 50 : fd_(fd),
|
/system/connectivity/shill/net/ |
H A D | io_handler_factory.cc | 28 int fd, 31 IOHandler* handler = new IOInputHandler(fd, input_callback, error_callback); 37 int fd, 40 IOHandler* handler = new IOReadyHandler(fd, mode, ready_callback); 27 CreateIOInputHandler( int fd, const IOHandler::InputCallback& input_callback, const IOHandler::ErrorCallback& error_callback) argument 36 CreateIOReadyHandler( int fd, IOHandler::ReadyMode mode, const IOHandler::ReadyCallback& ready_callback) argument
|
H A D | io_input_handler.cc | 27 IOInputHandler::IOInputHandler(int fd, argument 30 : fd_(fd), 50 void IOInputHandler::OnFileCanReadWithoutBlocking(int fd) { argument 51 CHECK_EQ(fd_, fd); 54 int len = read(fd, buf, sizeof(buf)); 66 void IOInputHandler::OnFileCanWriteWithoutBlocking(int fd) { argument
|
H A D | io_ready_handler.cc | 25 IOReadyHandler::IOReadyHandler(int fd, argument 28 : fd_(fd), 55 void IOReadyHandler::OnFileCanReadWithoutBlocking(int fd) { argument 56 CHECK_EQ(fd_, fd); 62 void IOReadyHandler::OnFileCanWriteWithoutBlocking(int fd) { argument 63 CHECK_EQ(fd_, fd);
|
/system/core/adb/ |
H A D | adb_utils.h | 49 bool set_file_block_mode(int fd, bool block); 51 extern int adb_close(int fd); 55 static void Close(int fd) { argument 56 adb_close(fd); 71 void Reset(int fd = -1) { 72 if (fd != fd_) { 76 fd_ = fd; 90 int fd() const { function in class:ScopedFd
|
H A D | fdevent.h | 31 typedef void (*fd_func)(int fd, unsigned events, void *userdata); 37 int fd; member in struct:fdevent 48 * Note: use FD_TIMER as 'fd' to create a fd-less object 51 fdevent *fdevent_create(int fd, fd_func func, void *arg); 60 void fdevent_install(fdevent *fde, int fd, fd_func func, void *arg);
|
H A D | set_verity_enable_state_service.cpp | 46 static int set_verity_enabled_state(int fd, const char *block_device, argument 50 WriteFdFmt(fd, "Could not make block device %s writable (%s).\n", 58 WriteFdFmt(fd, "Could not open block device %s (%s).\n", block_device, strerror(errno)); 59 WriteFdFmt(fd, "Maybe run adb root?\n"); 66 WriteFdFmt(fd, "Couldn't find verity metadata!\n"); 71 WriteFdFmt(fd, "Verity already disabled on %s\n", mount_point); 76 WriteFdFmt(fd, "Verity already enabled on %s\n", mount_point); 81 WriteFdFmt(fd, "Could not set verity %s flag on device %s with error %s\n", 87 WriteFdFmt(fd, "Verity %s on %s\n", enable ? "enabled" : "disabled", mount_point); 91 void set_verity_enabled_state_service(int fd, voi argument [all...] |
H A D | shell_service_protocol.cpp | 25 ShellProtocol::ShellProtocol(int fd) : fd_(fd) { argument
|
/system/core/fastboot/ |
H A D | fs.cpp | 17 static int generate_ext4_image(int fd, long long partSize, const std::string& initial_dir) argument 20 make_ext4fs_sparse_fd(fd, partSize, NULL, NULL); 22 make_ext4fs_sparse_fd_directory(fd, partSize, NULL, NULL, initial_dir.c_str()); 28 static int generate_f2fs_image(int fd, long long partSize, const std::string& initial_dir) argument 34 return make_f2fs_sparse_fd(fd, partSize, NULL, NULL); 42 int (*generate)(int fd, long long partSize, const std::string& initial_dir);
|
/system/core/fs_mgr/ |
H A D | fs_mgr_format.c | 37 int fd, rc = 0; local 39 if ((fd = open(fs_blkdev, O_WRONLY, 0644)) < 0) { 44 if ((ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) { 46 close(fd); 55 rc = make_ext4fs_internal(fd, NULL, NULL, fs_mnt_point, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL); 59 close(fd);
|
/system/core/libcutils/ |
H A D | ashmem-host.c | 45 int fd = mkstemp(template); local 46 if (fd == -1) return -1; 50 if (TEMP_FAILURE_RETRY(ftruncate(fd, size)) == -1) { 51 close(fd); 55 return fd; 58 int ashmem_set_prot_region(int fd __unused, int prot __unused) 63 int ashmem_pin_region(int fd __unused, size_t offset __unused, size_t len __unused) 68 int ashmem_unpin_region(int fd __unused, size_t offset __unused, size_t len __unused) 73 int ashmem_get_size_region(int fd) argument 76 int result = fstat(fd, [all...] |
H A D | socket_local_client_unix.c | 120 * connect to peer named "name" on fd 121 * returns same fd or -1 on error. 122 * fd is not closed on error. that's your job. 126 int socket_local_client_connect(int fd, const char *name, int namespaceId, argument 139 if(connect(fd, (struct sockaddr *) &addr, alen) < 0) { 143 return fd; 151 * returns fd or -1 on error
|
/system/core/libdiskconfig/ |
H A D | write_lst.c | 70 wlist_commit(int fd, struct write_list *lst, int test) argument 73 if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) { 79 if (write(fd, lst->data, lst->len) != (int)lst->len) {
|
/system/core/libion/tests/ |
H A D | invalid_values_test.cpp | 81 int fd; local 83 int ret = ion_alloc_fd(0, 4096, 0, m_firstHeap, 0, &fd); 86 EXPECT_EQ(-EBADF, ion_alloc_fd(-1, 4096, 0, m_firstHeap, 0, &fd)); 88 EXPECT_EQ(-ENODEV, ion_alloc_fd(m_ionFd, 4096, 0, 0, 0, &fd)); 92 EXPECT_EQ(-EINVAL, ion_alloc_fd(m_ionFd, 0, 0, heapMask, 0, &fd)); 94 EXPECT_EQ(-EINVAL, ion_alloc_fd(m_ionFd, -1, 0, heapMask, 0, &fd)); 96 EXPECT_EQ(-EINVAL, ion_alloc_fd(m_ionFd, 4096, -1, heapMask, 0, &fd)); 104 /* invalid ion fd */ 107 /* invalid ion fd */ 120 /* invalid ion fd */ [all...] |
/system/core/libpixelflinger/codeflinger/ |
H A D | blending.cpp | 73 int fd = component==GGLFormat::ALPHA ? mBlendDstA : mBlendDst; local 76 const int blending = blending_codes(fs, fd); 101 (fs==GGL_DST_COLOR && fd==GGL_ONE_MINUS_DST_COLOR) || 102 (fs==GGL_SRC_COLOR && fd==GGL_ONE_MINUS_SRC_COLOR) || 103 (fs==GGL_DST_ALPHA && fd==GGL_ONE_MINUS_DST_ALPHA) || 104 (fs==GGL_SRC_ALPHA && fd==GGL_ONE_MINUS_SRC_ALPHA); 107 (fs==GGL_ONE_MINUS_DST_COLOR && fd==GGL_DST_COLOR) || 108 (fs==GGL_ONE_MINUS_SRC_COLOR && fd==GGL_SRC_COLOR) || 109 (fs==GGL_ONE_MINUS_DST_ALPHA && fd==GGL_DST_ALPHA) || 110 (fs==GGL_ONE_MINUS_SRC_ALPHA && fd [all...] |
/system/core/libziparchive/ |
H A D | zip_archive_private.h | 29 const int fd; member in struct:ZipArchive 46 ZipArchive(const int fd, bool assume_ownership) : argument 47 fd(fd), 55 if (close_file && fd >= 0) { 56 close(fd);
|
/system/core/toolbox/ |
H A D | r.c | 60 int fd = open("/dev/mem", O_RDWR | O_SYNC); local 61 if(fd < 0) { 71 MAP_SHARED, fd, mmap_start);
|
/system/extras/f2fs_utils/ |
H A D | make_f2fs_main.c | 46 int fd; local 76 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); 77 if (fd < 0) { 82 fd = STDOUT_FILENO; 85 exitcode = make_f2fs_sparse_fd(fd, len, NULL, NULL); 87 close(fd);
|
/system/extras/multinetwork/ |
H A D | common.h | 57 FdAutoCloser() : fd(-1) {} 58 /* not explicit */ FdAutoCloser(int fd) : fd(fd) {} argument 60 if (fd > -1) { 61 close(fd); 63 fd = -1; 66 int fd; member in struct:FdAutoCloser
|
/system/extras/tests/crypto/ |
H A D | get_dm_versions.c | 31 int fd; local 33 fd = open("/dev/device-mapper", O_RDWR); 34 if (fd < 0) { 43 if (ioctl(fd, DM_LIST_VERSIONS, io)) { 55 close(fd);
|
/system/netd/client/ |
H A D | FwmarkClient.cpp | 47 int FwmarkClient::send(FwmarkCommand* data, int fd) { argument 71 char cmsg[CMSG_SPACE(sizeof(fd))]; 80 cmsgh->cmsg_len = CMSG_LEN(sizeof(fd)); 83 memcpy(CMSG_DATA(cmsgh), &fd, sizeof(fd)); local
|
/system/netd/server/ |
H A D | main.cpp | 138 int fd = open(PID_FILE_PATH, PID_FILE_FLAGS, PID_FILE_MODE); local 139 if (fd == -1) { 145 if (fchmod(fd, PID_FILE_MODE) == -1) { 147 close(fd); 152 if (write(fd, pid_buf, strlen(pid_buf)) != (ssize_t)strlen(pid_buf)) { 154 close(fd); 158 close(fd);
|