• Home
  • Raw
  • Download

Lines Matching refs:sz

158     int sz;  in load_file()  local
166 sz = lseek(fd, 0, SEEK_END); in load_file()
167 if(sz < 0) goto oops; in load_file()
171 data = (char*) malloc(sz); in load_file()
174 if(read(fd, data, sz) != sz) goto oops; in load_file()
177 if(_sz) *_sz = sz; in load_file()
308 unsigned *sz, const char *cmdline) in load_bootable_image() argument
335 *sz = ksize; in load_bootable_image()
355 *sz = bsize; in load_bootable_image()
360 void *unzip_file(zipfile_t zip, const char *name, unsigned *sz) in unzip_file() argument
372 *sz = get_zipentry_size(entry); in unzip_file()
374 datasz = *sz * 1.001; in unzip_file()
378 fprintf(stderr, "failed to allocate %d bytes\n", *sz); in unzip_file()
462 static void setup_requirements(char *data, unsigned sz) in setup_requirements() argument
467 while (sz-- > 0) { in setup_requirements()
598 unsigned int sz; in do_flash() local
599 data = load_file(fname, &sz); in do_flash()
601 fb_queue_flash(pname, data, sz); in do_flash()
608 unsigned sz; in do_update_signature() local
609 data = unzip_file(zip, fn, &sz); in do_update_signature()
611 fb_queue_download("signature", data, sz); in do_update_signature()
620 unsigned sz; in do_update() local
633 data = unzip_file(zip, "android-info.txt", &sz); in do_update()
637 data = unzip_file(zip, "android-product.txt", &sz); in do_update()
638 if ((data == 0) || (sz < 1)) { in do_update()
641 tmp = malloc(sz + 128); in do_update()
645 sz = strlen(tmp); in do_update()
648 setup_requirements(data, sz); in do_update()
650 data = unzip_file(zip, "boot.img", &sz); in do_update()
656 fb_queue_flash("boot", data, sz); in do_update()
658 data = unzip_file(zip, "recovery.img", &sz); in do_update()
664 fb_queue_flash("recovery", data, sz); in do_update()
667 data = unzip_file(zip, "system.img", &sz); in do_update()
673 fb_queue_flash("system", data, sz); in do_update()
679 unsigned sz; in do_send_signature() local
687 data = load_file(fn, &sz); in do_send_signature()
690 fb_queue_download("signature", data, sz); in do_send_signature()
698 unsigned sz; in do_flashall() local
706 data = load_file(fname, &sz); in do_flashall()
708 setup_requirements(data, sz); in do_flashall()
711 data = load_file(fname, &sz); in do_flashall()
717 fb_queue_flash("boot", data, sz); in do_flashall()
720 data = load_file(fname, &sz); in do_flashall()
726 fb_queue_flash("recovery", data, sz); in do_flashall()
730 data = load_file(fname, &sz); in do_flashall()
736 fb_queue_flash("system", data, sz); in do_flashall()
808 unsigned sz; in main() local
920 data = load_file(argv[1], &sz); in main()
922 if (sz != 256) die("signature must be 256 bytes"); in main()
923 fb_queue_download("signature", data, sz); in main()
947 data = load_bootable_image(page_size, kname, rname, &sz, cmdline); in main()
949 fb_queue_download("boot.img", data, sz); in main()
978 data = load_bootable_image(page_size, kname, rname, &sz, cmdline); in main()
980 fb_queue_flash(pname, data, sz); in main()