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

12345678

/system/core/sh/
H A Dnodes.c274 new->nfile.fd = n->nfile.fd;
281 new->ndup.fd = n->ndup.fd;
287 new->nhere.fd = n->nhere.fd;
H A Dhistedit.c375 int fd; local
378 if ((fd = mkstemp(editfile)) < 0)
380 if ((efp = fdopen(fd, "w")) == NULL) {
381 close(fd);
/system/extras/ext4_utils/
H A Doutput_file.c49 int fd; member in struct:output_file
63 ret = lseek64(out->fd, off, SEEK_SET);
74 ret = write(out->fd, data, len);
88 close(out->fd);
372 out->fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
373 if (out->fd < 0) {
379 out->fd = STDOUT_FILENO;
392 wipe_block_device(out->fd, info.len);
H A Dsimg2img.c44 static int read_all(int fd, void *buf, size_t len) argument
51 ret = read(fd, ptr, len - total);
66 static int write_all(int fd, void *buf, size_t len) argument
73 ret = write(fd, ptr, len - total);
H A Dext4_utils.h44 int fd, off64_t offset)
46 return __mmap2(addr, length, prot, flags, fd, offset >> 12);
43 mmap64(void *addr, size_t length, int prot, int flags, int fd, off64_t offset) argument
/system/core/toolbox/
H A Dnewfs_msdos.c272 int ch, fd, fd1; local
376 fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
377 if (fd == -1)
379 if (ftruncate(fd, opt_create))
381 } else if ((fd = open(fname, opt_N ? O_RDONLY : O_RDWR)) == -1)
383 if (fstat(fd, &sb))
394 if (opt_ofs && opt_ofs != lseek(fd, opt_ofs, SEEK_SET))
416 getdiskinfo(fd, fname, dtype, oflag, &bpb);
720 if ((n = write(fd, img, bpb.bps)) == -1)
784 getdiskinfo(int fd, cons argument
827 getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, struct bpb *bpb) argument
[all...]
H A Ddd.h55 int fd; /* file descriptor */ member in struct:__anon440
H A Dschedtop.c81 int fd; local
83 fd = open(line, O_RDONLY);
84 if(fd == 0)
86 len = read(fd, line, line_size - 1);
87 close(fd);
/system/core/adb/
H A Dfile_sync_service.h79 void file_sync_service(int fd, void *cookie);
/system/core/include/cutils/
H A Dlogprint.h147 int fd,
/system/core/sh/bltin/
H A Dbltin.h62 #define fileno(f) ((f)->fd)
/system/extras/procrank/
H A Dprocrank.c52 int fd = open("/proc/meminfo", O_RDONLY); local
54 if (fd < 0) {
59 const int len = read(fd, buffer, sizeof(buffer)-1);
60 close(fd);
/system/media/wilhelm/src/android/
H A Dandroid_defs.h188 kDataLocatorFd = 'fd',
192 int fd; member in struct:android::FdInfo
195 bool mCloseAfterUse; // whether to close fd after last reference to fd
H A Dandroid_AudioSfDecoder.cpp202 // As FileSource unconditionally takes ownership of the fd and closes it, then
204 int fd = mDataLocator.fdi.fd; local
208 fd = ::dup(fd);
210 dataSource = new FileSource(fd, mDataLocator.fdi.offset, mDataLocator.fdi.length);
/system/netd/
H A Dlogwrapper.c151 int fd = open("/dev/cpuctl/bg_non_interactive/tasks", O_WRONLY); local
152 if (fd >= 0) {
155 if (write(fd, text, strlen(text)) < 0) {
159 close(fd);
H A DSoftapController.cpp270 int ret = 0, i = 0, fd; local
312 fd = open(HOSTAPD_CONF_FILE, O_CREAT | O_TRUNC | O_WRONLY, 0660);
313 if (fd < 0) {
319 if (write(fd, fbuf, strlen(fbuf)) < 0) {
323 close(fd);
/system/media/wilhelm/tests/sandbox/
H A Dxaplay.c246 int fd = -1; local
248 fd = open(uri, O_RDONLY);
249 if (fd < 0) {
255 ok = fstat(fd, &statbuf);
265 ptr = mmap(NULL, statbuf.st_size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, (off_t) 0);
532 if (fd >= 0) {
533 (void) close(fd);
/system/media/wilhelm/tests/examples/
H A DslesTestEqFdPath.cpp124 int fd = open(path, O_RDONLY); local
125 if (fd == -1) {
128 locatorFd.fd = (SLint32) fd;
272 close(fd);
H A DslesTestEqOutputPath.cpp131 int fd = open(path, O_RDONLY); local
132 if (fd == -1) {
135 locatorFd.fd = (SLint32) fd;
276 close(fd);
H A DslesTestSendToPresetReverb.cpp178 int fd = open(path, O_RDONLY); local
179 if (fd == -1) {
183 locatorFd.fd = (SLint32) fd;
188 fprintf(stderr, "option --fd is not supported\n");
322 close(locatorFd.fd);
352 } else if (!strcmp(arg, "--fd")) {
362 fprintf(stdout, "Usage: \t%s [--always-on] [--fd] [--loop] path preset directLevel "
H A DslesTestDecodeAac.cpp354 void TestDecToBuffQueue( SLObjectItf sl, const char *path, int fd) argument
359 ok = fstat(fd, &statbuf);
372 ptr = mmap(NULL, statbuf.st_size, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, (off_t) 0);
764 int fd; local
765 fd = open(argv[1], O_RDONLY);
766 if (fd < 0) {
782 TestDecToBuffQueue(sl, argv[1], fd);
788 (void) close(fd);
/system/core/libcutils/
H A Dtzstrftime.c730 int fd; local
771 fd = open(filename, O_RDONLY);
772 if (fd < 0) {
779 fd = open(filename, O_RDONLY);
780 if (fd < 0)
783 if (fstat(fd, &st) != 0)
795 if (read(fd, p, (size_t) st.st_size) != st.st_size)
797 if (close(fd) != 0)
835 (void) close(fd);
/system/core/fastboot/
H A Dfastboot.c122 int fd; local
125 fd = open(fn, O_RDONLY);
126 if(fd < 0) return 0;
128 sz = lseek(fd, 0, SEEK_END);
131 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
136 if(read(fd, data, sz) != sz) goto oops;
137 close(fd);
143 close(fd);
/system/core/include/diskconfig/
H A Ddiskconfig.h110 int wlist_commit(int fd, struct write_list *lst, int test);
/system/core/include/usbhost/
H A Dusbhost.h97 struct usb_device *usb_device_new(const char *dev_name, int fd);

Completed in 1340 milliseconds

12345678