Lines Matching refs:sz

98     int64_t sz;  member
159 static void* load_fd(int fd, int64_t* sz) { in load_fd() argument
163 *sz = get_file_size(fd); in load_fd()
164 if (*sz < 0) { in load_fd()
168 data = (char*) malloc(*sz); in load_fd()
171 if(read(fd, data, *sz) != *sz) goto oops; in load_fd()
184 static void* load_file(const char* fn, int64_t* sz) { in load_file() argument
187 return load_fd(fd, sz); in load_file()
403 const char* secondstage, int64_t* sz, in load_bootable_image() argument
426 *sz = ksize; in load_bootable_image()
462 *sz = bsize; in load_bootable_image()
467 static void* unzip_file(ZipArchiveHandle zip, const char* entry_name, int64_t* sz) in unzip_file() argument
476 *sz = zip_entry.uncompressed_length; in unzip_file()
480 fprintf(stderr, "failed to allocate %" PRId64 " bytes for '%s'\n", *sz, entry_name); in unzip_file()
678 static void setup_requirements(char* data, int64_t sz) { in setup_requirements() argument
680 while (sz-- > 0) { in setup_requirements()
785 int64_t sz = get_file_size(fd); in load_buf_fd() local
786 if (sz == -1) { in load_buf_fd()
791 int64_t limit = get_sparse_limit(transport, sz); in load_buf_fd()
800 void* data = load_fd(fd, &sz); in load_buf_fd()
804 buf->sz = sz; in load_buf_fd()
831 int64_t sz = sparse_file_len(*s, true, false); in flash_buf() local
832 sparse_files.emplace_back(*s, sz); in flash_buf()
844 fb_queue_flash(pname, buf->data, buf->sz); in flash_buf()
969 int64_t sz; in do_update_signature() local
970 void* data = unzip_file(zip, fn, &sz); in do_update_signature()
972 fb_queue_download("signature", data, sz); in do_update_signature()
988 int64_t sz; in do_update() local
989 void* data = unzip_file(zip, "android-info.txt", &sz); in do_update()
995 setup_requirements(reinterpret_cast<char*>(data), sz); in do_update()
1035 int64_t sz; in do_send_signature() local
1036 void* data = load_file(fn, &sz); in do_send_signature()
1039 fb_queue_download("signature", data, sz); in do_send_signature()
1051 int64_t sz; in do_flashall() local
1052 void* data = load_file(fname, &sz); in do_flashall()
1055 setup_requirements(reinterpret_cast<char*>(data), sz); in do_flashall()
1091 int64_t sz; in do_bypass_unlock_command() local
1092 void* data = load_file(*argv, &sz); in do_bypass_unlock_command()
1094 fb_queue_download("unlock_message", data, sz); in do_bypass_unlock_command()
1256 int64_t sz; in main() local
1474 data = load_file(argv[1], &sz); in main()
1476 if (sz != 256) die("signature must be 256 bytes"); in main()
1477 fb_queue_download("signature", data, sz); in main()
1514 data = load_bootable_image(kname, rname, sname, &sz, cmdline); in main()
1516 fb_queue_download("boot.img", data, sz); in main()
1552 data = load_bootable_image(kname, rname, sname, &sz, cmdline); in main()
1555 fb_queue_flash(partition.c_str(), data, sz); in main()