Lines Matching refs:buffer
45 char* buffer = malloc(erase_size);
46 if (mtd_read_data(read, buffer, erase_size) != erase_size) {
49 free(buffer);
52 if (mtd_read_data(read, buffer, erase_size) != erase_size) {
55 free(buffer);
60 if (memcmp(buffer, LOG_MAGIC, LOG_MAGIC_SIZE) != 0) {
62 free(buffer);
66 size_t log_size = *(size_t *)(buffer + LOG_MAGIC_SIZE);
69 fwrite(buffer + sizeof(size_t) + LOG_MAGIC_SIZE, 1, log_size, stdout);
72 free(buffer);