/system/core/init/ |
H A D | keychords.c | 67 int fd, ret; local 75 fd = open("/dev/keychord", O_RDWR); 76 if (fd < 0) { 80 fcntl(fd, F_SETFD, FD_CLOEXEC); 82 ret = write(fd, keychords, keychords_length); 85 close(fd); 86 fd = -1; 92 keychord_fd = fd;
|
H A D | logo.c | 45 int fd; member in struct:FB 56 fb->fd = open("/dev/graphics/fb0", O_RDWR); 57 if (fb->fd < 0) 60 if (ioctl(fb->fd, FBIOGET_FSCREENINFO, &fb->fi) < 0) 62 if (ioctl(fb->fd, FBIOGET_VSCREENINFO, &fb->vi) < 0) 66 MAP_SHARED, fb->fd, 0); 73 close(fb->fd); 80 close(fb->fd); 87 ioctl(fb->fd, FBIOPUT_VSCREENINFO, &fb->vi); 89 ioctl(fb->fd, FBIOPUT_VSCREENINF 94 int fd, r; local 111 int fd; local [all...] |
H A D | property_service.c | 117 int fd; member in struct:__anon374 123 int fd; local 128 fd = open("/dev/__properties__", O_RDWR | O_CREAT, 0600); 129 if (fd < 0) 132 if (ftruncate(fd, size) < 0) 135 data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 139 close(fd); 141 fd = open("/dev/__properties__", O_RDONLY); 142 if (fd < 0) 149 w->fd 325 int fd, length; local 484 get_property_workspace(int *fd, int *sz) argument 536 int fd, length; local 609 int fd; local [all...] |
H A D | property_service.h | 27 void get_property_workspace(int *fd, int *sz);
|
H A D | ueventd.c | 90 ufd.fd = get_device_fd();
|
H A D | util.c | 91 int fd, ret; local 96 fd = socket(PF_UNIX, type, 0); 97 if (fd < 0) { 122 ret = bind(fd, (struct sockaddr *) &addr, sizeof (addr)); 139 return fd; 144 close(fd); 153 int fd; local 157 fd = open(fn, O_RDONLY); 158 if(fd < 0) return 0; 162 if (fstat(fd, 203 int fd; local 374 int fd; local 396 int fd, n; local 442 int fd; local [all...] |
H A D | watchdogd.c | 31 int fd; local 50 fd = open(DEV_NAME, O_RDWR); 51 if (fd < 0) { 56 ret = ioctl(fd, WDIOC_SETTIMEOUT, &timeout); 59 ret = ioctl(fd, WDIOC_GETTIMEOUT, &timeout); 73 write(fd, "", 1);
|
/system/core/libcorkscrew/ |
H A D | symbol_table.c | 60 int fd = open(filename, O_RDONLY); local 61 if (fd < 0) { 66 if (fstat(fd, &sb)) { 71 char* base = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, 0); 199 close(fd);
|
/system/core/libcutils/ |
H A D | abort_socket.c | 26 struct asocket *asocket_init(int fd) { argument 32 flags = fcntl(fd, F_GETFL); 35 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK)) 52 s->fd = fd; 65 ret = connect(s->fd, addr, addrlen); 73 pfd[0].fd = s->fd; 76 pfd[1].fd = s->abort_fd[0]; 102 if (getsockopt(s->fd, SOL_SOCKE [all...] |
H A D | android_reboot.c | 81 int fd, cnt = 0; local 86 fd = open("/proc/sysrq-trigger", O_WRONLY); 87 if (fd < 0) { 90 write(fd, "u", 1); 91 close(fd);
|
H A D | ashmem-dev.c | 44 int fd, ret; local 46 fd = open(ASHMEM_DEVICE, O_RDWR); 47 if (fd < 0) 48 return fd; 54 ret = ioctl(fd, ASHMEM_SET_NAME, buf); 59 ret = ioctl(fd, ASHMEM_SET_SIZE, size); 63 return fd; 66 close(fd); 70 int ashmem_set_prot_region(int fd, int prot) argument 72 return ioctl(fd, ASHMEM_SET_PROT_MAS 75 ashmem_pin_region(int fd, size_t offset, size_t len) argument 81 ashmem_unpin_region(int fd, size_t offset, size_t len) argument 87 ashmem_get_size_region(int fd) argument [all...] |
H A D | ashmem-host.c | 42 int fd; local 60 fd = open(name, O_RDWR | O_CREAT | O_EXCL, 0600); 61 if (fd == -1) { 69 if (ftruncate(fd, size) == -1) 75 return fd; 77 close(fd); 81 int ashmem_set_prot_region(int fd, int prot) argument 86 int ashmem_pin_region(int fd, size_t offset, size_t len) argument 91 int ashmem_unpin_region(int fd, size_t offset, size_t len) argument 96 int ashmem_get_size_region(int fd) argument [all...] |
H A D | buffer.c | 77 ssize_t bufferRead(Buffer* buffer, int fd) { argument 80 ssize_t bytesRead = read(fd, 96 ssize_t bufferWrite(Buffer* buffer, int fd) { argument 100 ssize_t bytesWritten = write(fd,
|
H A D | buffer.h | 92 ssize_t bufferRead(Buffer* buffer, int fd); 100 * Writes data from buffer to the given fd. Returns -1 and sets errno in case 106 ssize_t bufferWrite(Buffer* buffer, int fd);
|
H A D | debugger.c | 56 int dump_backtrace_to_file(pid_t tid, int fd) { argument 78 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) {
|
H A D | fs.c | 78 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY)); local 79 if (fd == -1) { 85 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) { 93 close(fd); 97 close(fd); 109 int fd = TEMP_FAILURE_RETRY(mkstemp(temp)); local 110 if (fd == -1) { 121 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) { 125 if (close(fd) == -1) { 138 close(fd); [all...] |
H A D | load_file.c | 26 int fd; local 29 fd = open(fn, O_RDONLY); 30 if(fd < 0) return 0; 32 sz = lseek(fd, 0, SEEK_END); 35 if(lseek(fd, 0, SEEK_SET) != 0) goto oops; 40 if(read(fd, data, sz) != sz) goto oops; 41 close(fd); 48 close(fd);
|
H A D | mq.c | 173 SelectableFd* fd; member in struct:PeerProxy 211 static void setNonBlocking(int fd) { argument 213 if ((flags = fcntl(fd, F_GETFL, 0)) < 0) { 216 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) { 221 /** Closes a fd and logs a warning if the close fails. */ 222 static void closeWithWarning(int fd) { argument 223 int result = close(fd); 408 // Remove the fd from the selector. 409 if (peerProxy->fd != NULL) { 410 peerProxy->fd 515 peerProxyWrite(SelectableFd* fd) argument 561 peerProxyBeforeSelect(SelectableFd* fd) argument 706 peerProxySetFd(PeerProxy* peerProxy, SelectableFd* fd) argument 965 peerProxyRead(SelectableFd* fd) argument [all...] |
H A D | partition_utils.c | 42 int fd, ret, wiped; local 44 if ((fd = open(source, O_RDONLY)) < 0) { 48 ret = read(fd, buf, sizeof(buf)); 49 close(fd);
|
H A D | process_name.c | 80 int fd = open(PROCESS_NAME_DEVICE, O_RDWR); local 81 if (fd < 0) 83 write(fd, process_name, strlen(process_name) + 1); 84 close(fd);
|
H A D | qtaguid.c | 61 int fd, res, savedErrno; local 65 fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY)); 66 if (fd < 0) { 70 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); 79 close(fd); 147 int fd, cnt = 0, res = 0; local
|
H A D | record_stream.c | 34 int fd; member in struct:RecordStream 45 extern RecordStream *record_stream_new(int fd, size_t maxRecordLen) argument 53 ret->fd = fd; 115 * Reads the next record from stream fd 166 countRead = read (p_rs->fd, p_rs->read_end, p_rs->buffer_end - p_rs->read_end);
|
H A D | sched_policy.c | 70 int fd; local 74 fd = bg_cgroup_fd; 79 fd = fg_cgroup_fd; 83 fd = system_cgroup_fd; 87 fd = -1; 91 if (fd < 0) { 106 if (write(fd, ptr, end - ptr) < 0) { 275 int fd; local 280 fd = open(statfile, O_RDONLY); 281 if (fd > [all...] |
H A D | selector.c | 49 if (read(wakeupFd->fd, garbage, sizeof(garbage)) < 0) { 99 ALOGD("Wakeup fd: %d", selector->wakeupPipe[0]); 112 SelectableFd* selectorAdd(Selector* selector, int fd) { argument 118 selectableFd->fd = fd; 127 * Adds an fd to the given set if the callback is non-null. Returns true 128 * if the fd was added. 133 FD_SET(selectableFd->fd, fdSet); 172 ALOGD("Selecting fd %d for writing...", selectableFd->fd); 185 int fd = selectableFd->fd; local [all...] |
H A D | socket_local_client.c | 118 * connect to peer named "name" on fd 119 * returns same fd or -1 on error. 120 * fd is not closed on error. that's your job. 124 int socket_local_client_connect(int fd, const char *name, int namespaceId, argument 138 if(connect(fd, (struct sockaddr *) &addr, alen) < 0) { 142 return fd; 150 * returns fd or -1 on error
|