Searched refs:read (Results 1 - 25 of 117) sorted by relevance

12345

/system/core/libcutils/
H A Ddebugger.c39 if (TEMP_FAILURE_RETRY(read(s, &ack, 1)) != 1) {
43 ssize_t n = TEMP_FAILURE_RETRY(read(s, pathbuf, pathlen - 1));
72 if (TEMP_FAILURE_RETRY(read(s, &ack, 1)) != 1) {
77 while ((n = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer)))) > 0) {
H A Dload_file.c40 if(read(fd, data, sz) != sz) goto oops;
H A Dpartition_utils.c48 ret = read(fd, buf, sizeof(buf));
H A Duio.c31 int ret = read( fd, buf, len );
/system/core/libsparse/
H A Dsimg_dump.py55 header_bin = FH.read(28)
97 header_bin = FH.read(12)
115 FH.read(data_sz)
122 fill_bin = FH.read(4)
137 crc_bin = FH.read(4)
161 junk_len = len(FH.read())
/system/extras/libublock/include/ublock/
H A Dublock.h28 int (*read)(char *buf, uint64_t length, uint64_t offset); member in struct:ublock_ops
35 * May call your read and write functions as the kernel scans partition
/system/media/audio_utils/include/audio_utils/
H A Decho_reference.h25 /* Buffer descriptor used by read() and write() methods, including the time stamp and delay. */
39 * when used for EchoReference::read():
50 int (*read)(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer); member in struct:echo_reference_itfe
/system/core/libctest/
H A Dctest.c79 size_t read; local
80 while ((read = fread(buffer, sizeof(char), 512, suite->out)) > 0) {
81 // TODO: Make sure we actually wrote 'read' bytes.
82 fwrite(buffer, sizeof(char), read, stderr);
/system/core/toolbox/
H A Dcmp.c63 res1 = read(fd1, &buf1, sizeof(buf1));
64 res2 = read(fd2, &buf2, sizeof(buf2));
H A Dmd5.c39 rlen = read(fd, buf, sizeof(buf));
44 fprintf(stderr,"could not read %s, %s\n", path, strerror(errno));
H A Dnotify.c86 res = read(nfd, event_buf, sizeof(event_buf));
116 read_len = read(ffd, buf, buflen);
/system/extras/tests/ext4/
H A Dcorrupt_gdt_free_blocks.c35 fprintf(stderr, "%s: Cannot lseek to superblock to read\n", me);
39 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) {
40 fprintf(stderr, "%s: Cannot read superblock\n", me);
64 /* read first block group descriptor, decrement free block count, and
68 fprintf(stderr, "%s: Cannot lseek to block group descriptor table to read\n", me);
72 /* Read in block group descriptors till we read one that has at least one free block */
75 if (read(fd, &gd, sizeof(gd)) != sizeof(gd)) {
76 fprintf(stderr, "%s: Cannot read group descriptor %d\n", me, i);
H A Drand_emmc_perf.c17 /* A simple test of emmc random read and write performance. When testing write
60 /* Do nothing, read mode is the default */
75 * but clear o_sync if in read mode */
95 if (read(fd2, &seed, sizeof(seed)) != sizeof(seed)) {
96 fprintf(stderr, "Cannot read /dev/urandom\n");
112 if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
113 fprintf(stderr, "Short read\n");
H A Dset_ext4_err_bit.c31 fprintf(stderr, "%s: Cannot lseek to superblock to read\n", me);
35 if (read(fd, sb, SB_SIZE) != SB_SIZE) {
36 fprintf(stderr, "%s: Cannot read superblock\n", me);
/system/extras/libpagemap/
H A Dpm_kernel.c125 if (read(ker->kpagecount_fd, count_out, sizeof(uint64_t)) <
141 if (read(ker->kpageflags_fd, flags_out, sizeof(uint64_t)) <
/system/core/debuggerd/
H A Dcrasher.c32 read(s, tmp, 1);
/system/core/fastboot/
H A Dusb_windows.c55 /// Handle to USB read pipe (endpoint)
106 // Open read pipe (endpoint)
198 unsigned long read = 0; local
209 &read,
212 DBG("usb_read got: %ld, expected: %d, errno: %d\n", read, xfer, errno);
214 return read;
307 // read serial number (if there is one)
/system/core/libdiskconfig/
H A Ddiskutils.c51 ALOGE("Could not open '%s' for read/write (errno=%d).", dst, errno);
62 if ((nr_bytes = read(src_fd, buffer, sizeof(buffer))) < 0) {
97 ALOGE("Exited read/write loop without setting flag! WTF?!");
/system/core/adb/
H A Dusb_windows.c43 /// Handle to USB read pipe (endpoint)
209 // Open read pipe (endpoint)
304 unsigned long read = 0; local
315 &read,
318 D("usb_write got: %ld, expected: %d, errno: %d\n", read, xfer, saved_errno);
320 data += read;
321 len -= read;
H A Dsysdeps.h95 /* unlink returns EACCES when the file is read-only, so we first */
130 return read(fd, buf, len);
132 #undef read macro
133 #define read ___xxx_read macro
360 return read(fd, buf, len);
363 #undef read macro
364 #define read ___xxx_read macro
/system/extras/sound/
H A Dplaywav.c143 if (read(fd, next, count) != count) {
144 fprintf(stderr,"could not read %d bytes\n", count);
161 if (read(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) {
162 fprintf(stderr, "playwav: cannot read header\n");
229 /* config change should be a read-modify-write operation */
231 perror("cannot read audio config");
243 perror("cannot read audio config");
263 while (read(0, &tmp, 1) == 1) {
266 if (read(afd, buf, sz) != sz) {
267 perror("cannot read buffe
[all...]
/system/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c100 ** set, then the bd_addr will be read from this path.
575 while ((count = read(fd, &buffer[i], len)) < len) {
583 while ((count = read(fd, &buffer[i], len)) < len) {
639 read(uart_fd, &buffer[0], 2);
646 while (read(hcdfile_fd, &buffer[1], 3)) {
651 read(hcdfile_fd, &buffer[4], len);
763 sz = read(fd, bdaddr, len);
765 fprintf(stderr, "read(%s) failed: %s (%d)", path, strerror(errno),
770 fprintf(stderr, "read(%s) unexpected size %d", path, sz);
/system/core/libsuspend/
H A Dautosuspend_earlysuspend.c53 // if the file doesn't exist, the error will be caught in read() below
55 err = read(fd, &buf, 1);
68 // if the file doesn't exist, the error will be caught in read() below
70 err = read(fd, &buf, 1);
/system/core/toolbox/grep/
H A Dfile.c109 nr = read(f->fd, buffer, MAXBUFSIZ);
117 nr = read(f->fd, buffer, MAXBUFSIZ);
215 /* Fill read buffer, also catches errors early */
262 /* Reset read buffer and line buffer */
/system/extras/fatblock/
H A DAndroid.mk20 LOCAL_SRC_FILES := fat.c fatblock.c fs.c import.c read.c utils.c fdpool.c

Completed in 566 milliseconds

12345