Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b32bd8a3 authored by Tao Bao's avatar Tao Bao Committed by Gerrit Code Review
Browse files

Merge "Allow OTA package size larger than 2GiB(2147483647 bytes) on sideload."

parents c2e6f041 77d61737
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -33,14 +33,15 @@
#include "sysdeps.h"

static void sideload_host_service(unique_fd sfd, const std::string& args) {
    int file_size;
  int64_t file_size;
  int block_size;
    if (sscanf(args.c_str(), "%d:%d", &file_size, &block_size) != 2) {
  if ((sscanf(args.c_str(), "%" SCNd64 ":%d", &file_size, &block_size) != 2) || file_size <= 0 ||
      block_size <= 0) {
    printf("bad sideload-host arguments: %s\n", args.c_str());
    exit(1);
  }

    printf("sideload-host file size %d block size %d\n", file_size, block_size);
  printf("sideload-host file size %" PRId64 " block size %d\n", file_size, block_size);

  int result = run_adb_fuse(sfd, file_size, block_size);