Lines Matching defs:sz

109     int64_t sz;
162 static void* load_fd(int fd, int64_t* sz) {
166 *sz = get_file_size(fd);
167 if (*sz < 0) {
171 data = (char*) malloc(*sz);
174 if(read(fd, data, *sz) != *sz) goto oops;
187 static void* load_file(const std::string& path, int64_t* sz) {
190 return load_fd(fd, sz);
443 const std::string& second_stage, int64_t* sz,
455 *sz = ksize;
483 *sz = bsize;
488 static void* unzip_file(ZipArchiveHandle zip, const char* entry_name, int64_t* sz) {
496 *sz = zip_entry.uncompressed_length;
498 fprintf(stderr, "extracting %s (%" PRId64 " MB)...\n", entry_name, *sz / 1024 / 1024);
501 fprintf(stderr, "failed to allocate %" PRId64 " bytes for '%s'\n", *sz, entry_name);
718 static void setup_requirements(char* data, int64_t sz) {
720 while (sz-- > 0) {
825 int64_t sz = get_file_size(fd);
826 if (sz == -1) {
831 int64_t limit = get_sparse_limit(transport, sz);
843 buf->sz = sz;
871 if (buf->sz < 256) {
922 int64_t sz = sparse_file_len(*s, true, false);
923 sparse_files.emplace_back(*s, sz);
934 fb_queue_flash_fd(pname, buf->fd, buf->sz);
1113 int64_t sz;
1114 void* data = unzip_file(zip, filename, &sz);
1116 fb_queue_download("signature", data, sz);
1153 int64_t sz;
1154 void* data = unzip_file(zip, "android-info.txt", &sz);
1160 setup_requirements(reinterpret_cast<char*>(data), sz);
1227 int64_t sz;
1228 void* data = load_file(fs_sig.c_str(), &sz);
1231 fb_queue_download("signature", data, sz);
1244 int64_t sz;
1245 void* data = load_file(fname.c_str(), &sz);
1248 setup_requirements(reinterpret_cast<char*>(data), sz);
1309 int64_t sz;
1310 void* data = load_file(filename.c_str(), &sz);
1312 fb_queue_download("unlock_message", data, sz);
1502 int64_t sz;
1719 data = load_file(filename.c_str(), &sz);
1721 if (sz != 256) die("signature must be 256 bytes");
1722 fb_queue_download("signature", data, sz);
1752 data = load_bootable_image(kernel, ramdisk, second_stage, &sz, cmdline);
1753 fb_queue_download("boot.img", data, sz);
1781 data = load_bootable_image(kernel, ramdisk, second_stage, &sz, cmdline);
1783 fb_queue_flash(partition.c_str(), data, sz);
1825 fb_queue_download_fd(filename.c_str(), buf.fd, buf.sz);