Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 19 of 19) sorted by relevance

/bootable/recovery/updater/
Dblockimg.c155 static void allocate(size_t size, uint8_t** buffer, size_t* buffer_alloc) { in allocate() argument
159 free(*buffer); in allocate()
161 *buffer = (uint8_t*) malloc(size); in allocate()
162 if (*buffer == NULL) { in allocate()
292 static int ReadBlocks(RangeSet* src, uint8_t* buffer, int fd) { in ReadBlocks() argument
297 if (!src || !buffer) { in ReadBlocks()
308 if (read_all(fd, buffer + p, size) == -1) { in ReadBlocks()
318 static int WriteBlocks(RangeSet* tgt, uint8_t* buffer, int fd) { in WriteBlocks() argument
323 if (!tgt || !buffer) { in WriteBlocks()
334 if (write_all(fd, buffer + p, size) == -1) { in WriteBlocks()
[all …]
Dinstall.c56 void uiPrint(State* state, char* buffer) { in uiPrint() argument
57 char* line = strtok(buffer, "\n"); in uiPrint()
78 char* buffer = malloc(SHA_DIGEST_SIZE*2 + 1); in PrintSha1() local
82 buffer[i*2] = alphabet[(digest[i] >> 4) & 0xf]; in PrintSha1()
83 buffer[i*2+1] = alphabet[digest[i] & 0xf]; in PrintSha1()
85 buffer[i*2] = '\0'; in PrintSha1()
86 return buffer; in PrintSha1()
440 char buffer[10]; in DeleteFn() local
441 sprintf(buffer, "%d", success); in DeleteFn()
442 return StringValue(strdup(buffer)); in DeleteFn()
[all …]
/bootable/recovery/edify/
Dmain.c186 char buffer[8192]; in main() local
187 int size = fread(buffer, 1, 8191, f); in main()
189 buffer[size] = '\0'; in main()
193 int error = parse_string(buffer, &root, &error_count); in main()
197 ExprDump(0, root, buffer); in main()
201 state.script = buffer; in main()
Dparser.y97 char buffer[256]; variable
98 snprintf(buffer, sizeof(buffer), "unknown function \"%s\"", $1);
99 yyerror(root, error_count, buffer);
Dexpr.c497 char* buffer = malloc(4096); in ErrorAbort() local
500 vsnprintf(buffer, 4096, format, v); in ErrorAbort()
503 state->errmsg = buffer; in ErrorAbort()
/bootable/recovery/mtdutils/
Dmtdutils.c40 char *buffer; member
47 char *buffer; member
262 ctx->buffer = malloc(partition->erase_size); in mtd_read_partition()
263 if (ctx->buffer == NULL) { in mtd_read_partition()
272 free(ctx->buffer); in mtd_read_partition()
335 memcpy(data + read, ctx->buffer + ctx->consumed, copy); in mtd_read_data()
353 if (read_block(ctx->partition, ctx->fd, ctx->buffer)) return -1; in mtd_read_data()
364 free(ctx->buffer); in mtd_read_close()
377 ctx->buffer = malloc(partition->erase_size); in mtd_write_partition()
378 if (ctx->buffer == NULL) { in mtd_write_partition()
[all …]
/bootable/recovery/
Drecovery.cpp278 std::string buffer(klog_buf_len, 0); in save_kernel_log() local
279 int n = klogctl(KLOG_READ_ALL, &buffer[0], klog_buf_len); in save_kernel_log()
284 buffer.resize(n); in save_kernel_log()
285 android::base::WriteStringToFile(buffer, destination); in save_kernel_log()
872 char buffer[80]; in load_locale_from_cache() local
874 fgets(buffer, sizeof(buffer), fp); in load_locale_from_cache()
877 for (i = 0; i < sizeof(buffer) && buffer[i]; ++i) { in load_locale_from_cache()
878 if (!isspace(buffer[i])) { in load_locale_from_cache()
879 buffer[j++] = buffer[i]; in load_locale_from_cache()
882 buffer[j] = 0; in load_locale_from_cache()
[all …]
Dfuse_sdcard_provider.c36 static int read_block_file(void* cookie, uint32_t block, uint8_t* buffer, uint32_t fetch_size) { in read_block_file() argument
46 ssize_t r = TEMP_FAILURE_RETRY(read(fd->fd, buffer, fetch_size)); in read_block_file()
52 buffer += r; in read_block_file()
Dinstall.cpp146 char buffer[1024]; in try_update_binary() local
148 while (fgets(buffer, sizeof(buffer), from_child) != NULL) { in try_update_binary()
149 char* command = strtok(buffer, " \n"); in try_update_binary()
Dfuse_sideload.h33 int (*read_block)(void* cookie, uint32_t block, uint8_t* buffer, uint32_t fetch_size);
Dasn1_decoder.h25 asn1_context_t* asn1_context_new(uint8_t* buffer, size_t length);
Dasn1_decoder.cpp41 asn1_context_t* asn1_context_new(uint8_t* buffer, size_t length) { in asn1_context_new() argument
46 ctx->p = buffer; in asn1_context_new()
/bootable/recovery/minadbd/
Dfuse_adb_provider.cpp29 int read_block_adb(void* data, uint32_t block, uint8_t* buffer, uint32_t fetch_size) { in read_block_adb() argument
37 if (!ReadFdExactly(ad->sfd, buffer, fetch_size)) { in read_block_adb()
Dfuse_adb_provider.h29 int read_block_adb(void* cookie, uint32_t block, uint8_t* buffer, uint32_t fetch_size);
/bootable/recovery/applypatch/
Dapplypatch.c476 unsigned char buffer[4096]; in WriteToPartition() local
479 for (p = 0; p < len; p += sizeof(buffer)) { in WriteToPartition()
481 if (to_read > sizeof(buffer)) to_read = sizeof(buffer); in WriteToPartition()
486 TEMP_FAILURE_RETRY(read(fd, buffer+so_far, to_read-so_far)); in WriteToPartition()
499 if (memcmp(buffer, data+p, to_read)) { in WriteToPartition()
642 unsigned char* buffer; member
652 memcpy(msi->buffer + msi->pos, data, len); in MemorySink()
930 msi.buffer = malloc(target_size); in GenerateTarget()
931 if (msi.buffer == NULL) { in GenerateTarget()
1016 if (WriteToPartition(msi.buffer, msi.pos, target_filename) != 0) { in GenerateTarget()
[all …]
Dbspatch.c85 int FillBuffer(unsigned char* buffer, int size, bz_stream* stream) { in FillBuffer() argument
86 stream->next_out = (char*)buffer; in FillBuffer()
/bootable/recovery/uncrypt/
Duncrypt.cpp69 static int write_at_offset(unsigned char* buffer, size_t size, int wfd, off64_t offset) { in write_at_offset() argument
76 ssize_t wrote = TEMP_FAILURE_RETRY(write(wfd, buffer + written, size - written)); in write_at_offset()
149 char buffer[PROPERTY_VALUE_MAX+1]; in find_block_device() local
150 if (property_get("ro.crypto.state", buffer, "") && in find_block_device()
151 strcmp(buffer, "encrypted") == 0) { in find_block_device()
/bootable/recovery/minzip/
DZip.h133 const ZipEntry *pEntry, unsigned char* buffer);
DZip.c711 unsigned char* buffer; member
719 memmove(bec->buffer, data, dataLen); in bufferProcessFunction()
720 bec->buffer += dataLen; in bufferProcessFunction()
731 const ZipEntry *pEntry, unsigned char *buffer) in mzExtractZipEntryToBuffer() argument
734 bec.buffer = buffer; in mzExtractZipEntryToBuffer()