Searched defs:fd (Results 76 - 100 of 208) sorted by relevance

123456789

/system/vold/
H A DExt4.cpp115 int fd; local
H A Dmain.cpp112 int dfd, fd; local
116 fd = openat(dfd, "uevent", O_WRONLY);
117 if(fd >= 0) {
118 write(fd, "add\n", 4);
119 close(fd);
131 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY);
132 if(fd < 0)
135 d2 = fdopendir(fd);
137 close(fd);
/system/core/adb/
H A Dadb_client.c92 static int switch_socket_transport(int fd) argument
124 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
126 adb_close(fd);
131 if(adb_status(fd)) {
132 adb_close(fd);
140 int adb_status(int fd) argument
145 if(readx(fd, buf, 4)) {
161 if(readx(fd, buf, 4)) {
168 if(readx(fd, __adb_erro
180 int fd; local
222 int fd = _adb_connect("host:version"); local
297 int fd = adb_connect(service); local
318 int fd = adb_connect(service); local
[all...]
H A Dremount_service.c39 int fd; local
45 fd = unix_open("/proc/mounts", O_RDONLY | O_CLOEXEC);
46 if (fd < 0)
50 adb_read(fd, buf, sizeof(buf) - 1);
51 adb_close(fd);
86 int fd; local
98 fd = unix_open(dev, O_RDONLY | O_CLOEXEC);
99 if (fd < 0)
102 ioctl(fd, BLKROSET, &OFF);
103 adb_close(fd);
112 write_string(int fd, const char* str) argument
117 remount_service(int fd, void *cookie) argument
[all...]
/system/core/debuggerd/
H A Dbacktrace.cpp106 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed, argument
109 log.tfd = fd;
H A Dgetevent.cpp37 int fd; local
45 fd = open(device, O_RDWR);
46 if (fd < 0) {
50 if (ioctl(fd, EVIOCGVERSION, &version)) {
53 if (ioctl(fd, EVIOCGID, &id)) {
59 if (ioctl(fd, EVIOCGNAME(sizeof(name) - 1), &name) < 1) {
62 if (ioctl(fd, EVIOCGPHYS(sizeof(location) - 1), &location) < 1) {
65 if (ioctl(fd, EVIOCGUNIQ(sizeof(idstr) - 1), &idstr) < 1) {
82 ufds[nfds].fd = fd;
[all...]
H A Dutility.cpp34 static int write_to_am(int fd, const char* buf, int len) { argument
37 int written = TEMP_FAILURE_RETRY(write(fd, buf + len - to_write, to_write));
/system/core/fastbootd/
H A Dprotocol.c187 int fd; local
190 fd = phandle->download_fd;
194 return fd;
/system/core/libcutils/
H A Dqtaguid.c62 int fd, res, savedErrno; local
66 fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY));
67 if (fd < 0) {
71 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd)));
80 close(fd);
/system/core/libdiskconfig/
H A Ddiskconfig.c240 sync_ptable(int fd) argument
247 if (fstat(fd, &stat)) {
252 if (S_ISBLK(stat.st_mode) && ((rv = ioctl(fd, BLKRRPART, NULL)) < 0)) {
274 int fd; local
284 if ((fd = open(dinfo->device, O_RDWR)) < 0) {
289 if (fstat(fd, &stat)) {
302 if (ioctl(fd, BLKSSZGET, &sect_sz) < 0) {
314 if (ioctl(fd, BLKGETSIZE64, &disk_size) < 0) {
380 return fd;
383 close(fd);
388 validate_and_config(struct disk_info *dinfo, int *fd, struct write_list **lst) argument
423 int fd; local
437 int fd; local
[all...]
/system/core/libion/
H A Dion_test.c41 int _ion_alloc_test(int *fd, ion_user_handle_t *handle) argument
45 *fd = ion_open();
46 if (*fd < 0)
47 return *fd;
49 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle);
58 int fd, ret; local
61 if(_ion_alloc_test(&fd, &handle))
64 ret = ion_free(fd, handle);
69 ion_close(fd);
75 int fd, map_f local
136 int fd, share_fd, ret; local
171 int fd, recv_fd; local
[all...]
/system/core/libion/kernel-headers/linux/
H A Dion.h56 int fd; member in struct:ion_fd_data
/system/core/libion/original-kernel-headers/linux/
H A Dion.h95 * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair
97 * @fd: a file descriptor representing that handle
101 * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace
106 int fd; member in struct:ion_fd_data
152 * opaque handle. Returns the struct with the fd field set to a file
162 * opaque handle. Returns the struct with the fd field set to a file
172 * Takes an ion_fd_data struct with the fd field populated with a valid file
/system/core/libprocessgroup/
H A Dprocessgroup.cpp40 int fd; member in struct:ctx
71 int fd = open(path, O_RDONLY); local
72 if (fd < 0) {
78 ctx->fd = fd;
93 ssize_t ret = read(ctx->fd, ctx->buf_ptr + ctx->buf_len,
244 close(ctx.fd);
320 int fd = open(path, O_WRONLY); local
321 if (fd < 0) {
330 ret = write(fd, pi
[all...]
/system/core/libsysutils/src/
H A DSocketListener.cpp175 int fd = (*it)->getSocket(); local
176 FD_SET(fd, &read_fds);
177 if (fd > max) {
178 max = fd;
226 int fd = c->getSocket(); local
227 if (FD_ISSET(fd, &read_fds)) {
/system/core/libutils/
H A DTokenizer.cpp58 int fd = ::open(filename.string(), O_RDONLY); local
59 if (fd < 0) {
64 if (fstat(fd, &stat)) {
73 if (fileMap->create(NULL, fd, 0, length, true)) {
85 ssize_t nrd = read(fd, buffer, length);
100 close(fd);
/system/core/libziparchive/
H A Dzip_archive_test.cc167 int fd = mkstemp(full_path); local
168 if (fd == -1) {
170 fd = mkstemp(full_path);
173 return fd;
178 int fd = make_temporary_file(temp_file_pattern); local
179 ASSERT_NE(-1, fd);
181 ASSERT_EQ(file_size, TEMP_FAILURE_RETRY(write(fd, kEmptyEntriesZip, file_size)));
184 ASSERT_EQ(0, OpenArchiveFd(fd, "EmptyEntriesTest", &handle));
201 close(fd);
207 int fd local
223 int fd = make_temporary_file(kTempFilePattern); local
[all...]
/system/core/mkbootimg/
H A Dmkbootimg.c32 int fd; local
35 fd = open(fn, O_RDONLY);
36 if(fd < 0) return 0;
38 sz = lseek(fd, 0, SEEK_END);
41 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
46 if(read(fd, data, sz) != sz) goto oops;
47 close(fd);
53 close(fd);
77 int write_padding(int fd, unsigned pagesize, unsigned itemsize) argument
88 if(write(fd, paddin
109 int fd; local
[all...]
/system/core/toolbox/
H A Ddate.c16 int fd, ret; local
18 fd = open("/dev/alarm", O_RDWR);
19 if (fd < 0)
20 return fd;
22 ret = ioctl(fd, ANDROID_ALARM_SET_RTC, ts);
23 close(fd);
46 int fd, ret; local
50 fd = open("/dev/rtc0", O_RDWR);
51 if (fd < 0)
52 return fd;
[all...]
H A Dlsof.c133 static char* fd_path = "fd/";
165 int fd; local
188 fd = open(info.path, O_RDONLY);
189 if (fd < 0) {
195 int numRead = read(fd, cmdline, sizeof(cmdline) - 1);
196 close(fd);
H A Dnandread.c28 int fd; local
103 fd = open(devname, O_RDONLY);
104 if (fd < 0) {
125 ret = ioctl(fd, MEMGETINFO, &mtdinfo);
151 ret = ioctl(fd, ECCGETLAYOUT, &ecclayout);
164 ret = ioctl(fd, ECCGETSTATS, &initial_ecc);
181 ret = ioctl(fd, MTDFILEMODE, MTD_FILE_MODE_RAW);
194 lseek64(fd, pos, SEEK_SET);
195 ret = read(fd, buffer, mtdinfo.writesize + rawmode);
202 ret = ioctl(fd, MEMREADOO
[all...]
H A Dsendevent.c50 int fd; local
60 fd = open(argv[1], O_RDWR);
61 if(fd < 0) {
65 if (ioctl(fd, EVIOCGVERSION, &version)) {
73 ret = write(fd, &event, sizeof(event));
/system/core/toolbox/upstream-netbsd/bin/cat/
H A Dcat.c247 int fd; local
249 fd = fileno(stdin);
254 fd = fileno(stdin);
255 if (fd < 0)
259 fd = open(*argv, O_RDONLY|O_NONBLOCK, 0);
260 if (fd < 0)
263 if (fstat(fd, &st) == -1) {
264 close(fd);
268 close(fd);
273 else if ((fd
[all...]
/system/extras/ext4_utils/
H A Dext2simg.c56 static int build_sparse_ext(int fd, const char *filename) argument
76 ret = lseek64(fd, (u64)info.block_size * aux_info.bg_desc[i].bg_block_bitmap,
81 ret = read(fd, block_bitmap, info.block_size);
/system/extras/tests/audio/alsa/
H A Dpcmtest.cpp218 int fd = open("/dev/snd/timer", O_RDWR | O_NONBLOCK); local
219 ASSERT_GE(fd, 0);
220 int ret = ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver);
223 close(fd);

Completed in 399 milliseconds

123456789