Lines Matching refs:sz
816 static int adb_download_buffer(const char *service, const char *fn, const void* data, unsigned sz, in adb_download_buffer() argument
820 int fd = adb_connect(android::base::StringPrintf("%s:%d", service, sz), &error); in adb_download_buffer()
829 unsigned total = sz; in adb_download_buffer()
837 while (sz > 0) { in adb_download_buffer()
838 unsigned xfer = (sz > CHUNK_SIZE) ? CHUNK_SIZE : sz; in adb_download_buffer()
846 sz -= xfer; in adb_download_buffer()
849 printf("sending: '%s' %4d%% \r", fn, (int)(100LL - ((100LL * sz) / (total)))); in adb_download_buffer()
889 unsigned sz; in adb_sideload_host() local
897 uint8_t* data = reinterpret_cast<uint8_t*>(load_file(fn, &sz)); in adb_sideload_host()
905 android::base::StringPrintf("sideload-host:%d:%d", sz, SIDELOAD_HOST_BLOCK_SIZE); in adb_sideload_host()
912 status = adb_download_buffer("sideload", fn, data, sz, true); in adb_sideload_host()
935 if (offset >= sz) { in adb_sideload_host()
943 if (offset_end > sz) { in adb_sideload_host()
944 to_write = sz - offset; in adb_sideload_host()
961 int percent = (int)(xfer * 47LL / (sz ? sz : 1)); in adb_sideload_host()
969 printf("\rTotal xfer: %.2fx%*s\n", (double)xfer / (sz ? sz : 1), (int)strlen(fn)+10, ""); in adb_sideload_host()