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

/bootable/recovery/
H A Dbootloader.cpp81 MtdReadContext *read = mtd_read_partition(part); local
82 if (read == NULL) {
89 ssize_t r = mtd_read_data(read, data, size);
90 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno));
91 mtd_read_close(read);
107 MtdReadContext *read = mtd_read_partition(part); local
108 if (read == NULL) {
115 ssize_t r = mtd_read_data(read, data, size);
116 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno));
117 mtd_read_close(read);
[all...]
H A Dfuse_sdcard_provider.c44 ssize_t r = read(fd->fd, buffer, fetch_size);
47 printf("read on sdcard failed: %s\n", strerror(errno));
H A Droots.cpp51 LOGE("failed to read /etc/recovery.fstab\n");
286 read(fd, &oem_unlock_enabled, 1);
H A Dui.cpp256 int connected = (read(fd, &buf, 1) == 1) && (buf == 'C');
H A Dfuse_sideload.c25 // the following invariant: each read of a given position returns the
26 // same data as the first read at that position. That is, once a
27 // section of the file is read, future reads of that section return
29 // return one set of bits when the package is read for signature
32 // different than it did on the first read, the reader of the file
33 // will see their read fail with EINVAL.
86 uint32_t curr_block; // cache the block most recently read from the host
93 // if block hasn't been read yet)
245 // accept the block (this is the first time we've read this
247 // - Otherwise, return -EINVAL for the read
[all...]
/bootable/recovery/mtdutils/
H A Dmtdutils.c105 /* Open and read the file contents.
111 nbytes = read(fd, buf, sizeof(buf) - 1);
210 printf("Mount %s on %s read-only\n", devname, mount_point);
302 if (lseek64(fd, pos, SEEK_SET) != pos || read(fd, data, size) != size) {
303 printf("mtd: read error at 0x%08llx (%s)\n",
312 // copy the comparison baseline for the next read.
331 size_t read = 0; local
332 while (read < len) {
335 size_t copy = len - read < avail ? len - read
[all...]
H A Dflash_image.c75 int headerlen = read(fd, header, sizeof(header));
107 while ((len = read(fd, buf, sizeof(buf))) > 0) {
134 len = read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left);
H A Dmounts.c87 /* Open and read the file contents.
93 nbytes = read(fd, buf, sizeof(buf) - 1);
/bootable/recovery/minadbd/
H A Dsysdeps.h94 /* unlink returns EACCES when the file is read-only, so we first */
129 return read(fd, buf, len);
131 #undef read macro
132 #define read ___xxx_read macro
368 return read(fd, buf, len);
371 #undef read macro
372 #define read ___xxx_read macro
H A Dservices.c73 r = read(fd, buf, 4096);
H A Dusb_linux_client.c47 int (*read)(usb_handle *h, void *data, int len); member in struct:usb_handle
206 D("about to read (fd=%d, len=%d)\n", h->fd, len);
238 h->read = usb_adb_read;
407 D("about to read (fd=%d, len=%d)\n", h->bulk_out, len);
451 h->read = usb_ffs_read;
482 return h->read(h, data, len);
/bootable/recovery/applypatch/
H A Dapplypatch.c80 printf("short read of \"%s\" (%ld bytes of %ld)\n",
118 // the length in order to read from a partition (there is no
193 printf("failed to initialize read of mtd partition \"%s\"\n",
215 file->size = 0; // # bytes read so far
222 size_t read = 0; local
226 read = mtd_read_data(ctx, p, next);
230 read = fread(p, 1, next, dev);
233 if (next != read) {
234 printf("short read (%zu bytes of %zu) for partition \"%s\"\n",
235 read, nex
[all...]
/bootable/recovery/minui/
H A Devents.c74 /* read the evbits of the input device */
176 r = read(fd, ev, sizeof(*ev));
/bootable/recovery/uncrypt/
H A Duncrypt.c19 // to be read directly from the block device without mounting the
23 // read the file and rewrite it to the same blocks of the underlying
24 // (unencrypted) block device, so the file contents can be read
121 ALOGE("failed to read %s\n", fstab_path);
170 printf("read: %s", temp);
261 // read next block to tail
265 ssize_t this_read = read(fd, buffers[tail] + so_far, sb.st_blksize - so_far);
267 ALOGE("failed to read: %s\n", strerror(errno));
274 // If we're not encrypting; we don't need to actually read
275 // anything, just skip pos forward as if we'd read
[all...]
/bootable/recovery/updater/
H A Dinstall.c977 ErrorAbort(state, "%s: failed to read %lld bytes from %s",
1095 int read; local
1096 while (success && (read = fread(buffer, 1, BUFSIZ, f)) > 0) {
1097 int wrote = mtd_write_data(ctx, buffer, read);
1098 success = success && (wrote == read);
H A Dblockimg.c86 ssize_t r = read(fd, data+so_far, size-so_far);
88 fprintf(stderr, "read failed: %s\n", strerror(errno));
312 // - fill the blocks with data read from the new_data file
316 // - read the source blocks, apply a patch, write result to
328 // is read (ie, used as the source for a patch or move) after it
332 // in general we need to read the entire source into memory before

Completed in 1976 milliseconds