Searched refs:fd (Results 151 - 175 of 218) sorted by relevance

123456789

/system/core/adb/
H A Dframebuffer_service.c55 void framebuffer_service(int fd, void *cookie) argument
164 if(writex(fd, &fbinfo, sizeof(fbinfo))) goto done;
169 if(writex(fd, buf, sizeof(buf))) goto done;
172 if(writex(fd, buf, fbinfo.size % sizeof(buf))) goto done;
179 close(fd);
/system/extras/fatblock/
H A Dread.c74 int fd; local
101 fd = fdpool_open(&f->pfd, f->path, O_RDONLY);
102 if (fd < 0) {
107 sought = lseek(fd, (off_t)len, SEEK_SET);
114 ret = read(fd, buf, (size_t)len);
121 /* leave fd open; fdpool will close it if needed. */
/system/netd/
H A DSoftapController.cpp131 int ret = 0, i = 0, fd; local
172 fd = open(HOSTAPD_CONF_FILE, O_CREAT | O_TRUNC | O_WRONLY, 0660);
173 if (fd < 0) {
179 if (write(fd, fbuf, strlen(fbuf)) < 0) {
183 close(fd);
/system/core/sh/
H A Doutput.c113 file->fd = BLOCK_OUT;
151 if (dest->fd == BLOCK_OUT) {
161 } else if (dest->fd == MEM_OUT) {
188 if (dest->buf == NULL || dest->nextc == dest->buf || dest->fd < 0)
190 if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
251 strout.fd = BLOCK_OUT;
479 xwrite(int fd, char *buf, int nbytes) argument
488 i = write(fd, buf, n);
510 xioctl(int fd, unsigned long request, char *arg) argument
514 while ((i = ioctl(fd, reques
[all...]
H A Doutput.h46 short fd; member in struct:output
/system/core/toolbox/cp/
H A Dutils.c313 /* set the mod/access times now after close of the fd */
376 * in the stat structure. If fd is zero, also call set_utimes() to set
377 * the mod/access times. If fd is non-zero, the caller must do a utimes
378 * itself after close(fd).
381 setfile(struct stat *fs, int fd) argument
395 if (fd ? fchown(fd, fs->st_uid, fs->st_gid) :
404 if (fd ? fchmod(fd, fs->st_mode) : chmod(to.p_path, fs->st_mode)) {
406 if (fd
[all...]
/system/media/camera/src/
H A Dcamera_metadata.c611 static void print_data(int fd, const uint8_t *data_ptr, int type, int count,
615 int fd,
617 dump_indented_camera_metadata(metadata, fd, verbosity, 0);
621 int fd,
625 fdprintf(fd, "%*sDumping camera metadata array: Not allocated\n",
630 fdprintf(fd,
635 fdprintf(fd, "%*sVersion: %d, Flags: %08x\n",
656 fdprintf(fd, "%*s%s.%s (%05x): %s[%d]\n",
685 print_data(fd, data_ptr, entry->type, count, indentation);
689 static void print_data(int fd, cons argument
614 dump_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity) argument
620 dump_indented_camera_metadata(const camera_metadata_t *metadata, int fd, int verbosity, int indentation) argument
[all...]
/system/core/charger/
H A Dcharger.c247 int fd; local
250 fd = open(path, O_RDONLY, 0);
251 if (fd < 0)
254 cnt = read(fd, buf, sz - 1);
263 close(fd);
267 if (fd >= 0)
268 close(fd);
488 static int handle_uevent_fd(struct charger *charger, int fd) argument
493 if (fd < 0)
499 n = uevent_kernel_multicast_recv(fd, ms
515 uevent_callback(int fd, short revents, void *data) argument
530 int dfd, fd; local
894 input_callback(int fd, short revents, void *data) argument
932 int fd; local
[all...]
/system/core/libcutils/
H A Dsocket_local_client.c118 * 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
/system/core/fastboot/
H A Dfastboot.c144 int fd; local
146 fd = open(fn, O_RDONLY);
147 if (fd < 0) return -1;
149 off = lseek64(fd, 0, SEEK_END);
150 close(fd);
159 int fd; local
163 fd = open(fn, O_RDONLY);
164 if(fd < 0) return 0;
166 sz = lseek(fd, 0, SEEK_END);
169 if(lseek(fd,
492 int fd; local
[all...]
/system/core/libpixelflinger/codeflinger/
H A DCodeCache.cpp84 int fd = ashmem_create_region("CodeFlinger code cache", local
86 LOG_ALWAYS_FATAL_IF(fd < 0,
91 MAP_PRIVATE, fd, 0);
95 close(fd);
/system/extras/ext4_utils/
H A Dext4_utils.h50 int fd, off64_t offset)
52 return __mmap2(addr, length, prot, flags, fd, offset >> 12);
158 void write_ext4_image(int fd, int gz, int sparse, int crc);
166 u64 get_file_size(int fd);
49 mmap64(void *addr, size_t length, int prot, int flags, int fd, off64_t offset) argument
H A Dext4_utils.c84 void write_ext4_image(int fd, int gz, int sparse, int crc) argument
86 sparse_file_write(info.sparse_file, fd, gz, sparse, crc);
381 static u64 get_block_device_size(int fd) argument
387 ret = ioctl(fd, BLKGETSIZE64, &size);
389 ret = ioctl(fd, DKIOCGETBLOCKCOUNT, &size);
391 close(fd);
401 u64 get_file_size(int fd) argument
408 ret = fstat(fd, &buf);
418 computed_size = get_block_device_size(fd) - reserve_len;
H A Dmake_ext4fs.c307 int fd; local
313 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
314 if (fd < 0) {
319 status = make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 0, 0, 1, 0, sehnd);
320 close(fd);
325 int make_ext4fs_internal(int fd, const char *directory, argument
336 info.len = get_file_size(fd);
467 wipe_block_device(fd, info.len);
469 write_ext4_image(fd, gzip, sparse, crc);
/system/extras/libublock/
H A Dublock.c40 int fd; member in struct:ublock_ctx
249 in_len = read(ub_ctx->fd, in_buf, in_size);
257 out_wrote = write(ub_ctx->fd, out_buf, out_len);
371 ub_ctx->fd = open(CONTROL_FILE, O_RDWR);
372 if (ub_ctx->fd < 0) {
411 if (ub_ctx->fd)
412 close(ub_ctx->fd);
428 close(ub_ctx->fd);
/system/core/libsysutils/src/
H A DSocketListener.cpp169 int fd = (*it)->getSocket(); local
170 FD_SET(fd, &read_fds);
171 if (fd > max)
172 max = fd;
211 int fd = (*it)->getSocket(); local
212 if (FD_ISSET(fd, &read_fds)) {
/system/core/run-as/
H A Dpackage.c75 int fd, ret, old_errno; local
83 fd = TEMP_FAILURE_RETRY(open(filename, O_RDONLY));
84 if (fd < 0)
88 ret = TEMP_FAILURE_RETRY(fstat(fd, &st));
110 address = TEMP_FAILURE_RETRY(mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, 0));
122 close(fd);
/system/vold/
H A DVolumeManager.cpp564 int fd = open(ftsent->fts_accpath, O_NOFOLLOW); local
565 if (fd < 0) {
571 result |= fchown(fd, AID_SYSTEM, privateFile? gid : AID_SYSTEM);
574 result |= fchmod(fd, 0755);
576 result |= fchmod(fd, privateFile ? 0640 : 0644);
578 close(fd);
826 int dirfd, fd; local
901 int fd; local
1038 int fd; local
1041 if ((fd
1145 int fd = open(device, O_RDONLY); local
1223 int fd; local
1278 int fd; local
[all...]
H A DProcess.cpp67 int fd; local
69 fd = open(buffer, O_RDONLY);
70 if (fd < 0) {
73 int length = read(fd, buffer, max - 1);
75 close(fd);
88 sprintf(path, "/proc/%d/fd", pid);
/system/core/init/
H A Ddevices.c417 int fd; local
840 int dfd, fd; local
844 fd = openat(dfd, "uevent", O_WRONLY);
845 if(fd >= 0) {
846 write(fd, "add\n", 4);
847 close(fd);
857 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY);
858 if(fd < 0)
861 d2 = fdopendir(fd);
863 close(fd);
884 int fd; local
[all...]
/system/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c569 read_event(int fd, uchar *buffer) argument
575 while ((count = read(fd, &buffer[i], len)) < len) {
583 while ((count = read(fd, &buffer[i], len)) < len) {
744 int fd; local
756 fd = open(path, O_RDONLY);
757 if (fd < 0) {
763 sz = read(fd, bdaddr, len);
767 close(fd);
771 close(fd);
/system/core/libcorkscrew/
H A Dsymbol_table.c60 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/toolbox/
H A Diftop.c104 int ret, nr, fd; local
106 fd = open(PROC_NET_DEV, O_RDONLY);
107 if (fd < 0) {
112 ret = read(fd, buf, sizeof(buf) - 1);
179 ret = close(fd);
H A Dlsof.c136 static char* fd_path = "fd/";
168 int fd; local
191 fd = open(info.path, O_RDONLY);
192 if (fd < 0) {
198 int numRead = read(fd, cmdline, sizeof(cmdline) - 1);
199 close(fd);
/system/extras/libpagemap/
H A Dpm_process.c163 int fd; local
189 fd = open(filename, O_WRONLY);
190 if (fd < 0)
193 write(fd, "1\n", strlen("1\n"));
195 close(fd);

Completed in 110 milliseconds

123456789