Loading fastboot/device/flashing.cpp +4 −8 Original line number Original line Diff line number Diff line Loading @@ -185,14 +185,10 @@ int Flash(FastbootDevice* device, const std::string& partition_name) { return -EINVAL; return -EINVAL; } } uint64_t block_device_size = get_block_device_size(handle.fd()); uint64_t block_device_size = get_block_device_size(handle.fd()); if (data.size() > block_device_size) { if (data.size() < block_device_size && LOG(ERROR) << "Cannot flash " << data.size() << " bytes to block device of size " (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b" || << block_device_size; partition_name == "init_boot" || partition_name == "init_boot_a" || return -EOVERFLOW; partition_name == "init_boot_b")) { } else if (data.size() < block_device_size && (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b" || partition_name == "init_boot" || partition_name == "init_boot_a" || partition_name == "init_boot_b")) { CopyAVBFooter(&data, block_device_size); CopyAVBFooter(&data, block_device_size); } } if (android::base::GetProperty("ro.system.build.type", "") != "user") { if (android::base::GetProperty("ro.system.build.type", "") != "user") { Loading Loading
fastboot/device/flashing.cpp +4 −8 Original line number Original line Diff line number Diff line Loading @@ -185,14 +185,10 @@ int Flash(FastbootDevice* device, const std::string& partition_name) { return -EINVAL; return -EINVAL; } } uint64_t block_device_size = get_block_device_size(handle.fd()); uint64_t block_device_size = get_block_device_size(handle.fd()); if (data.size() > block_device_size) { if (data.size() < block_device_size && LOG(ERROR) << "Cannot flash " << data.size() << " bytes to block device of size " (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b" || << block_device_size; partition_name == "init_boot" || partition_name == "init_boot_a" || return -EOVERFLOW; partition_name == "init_boot_b")) { } else if (data.size() < block_device_size && (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b" || partition_name == "init_boot" || partition_name == "init_boot_a" || partition_name == "init_boot_b")) { CopyAVBFooter(&data, block_device_size); CopyAVBFooter(&data, block_device_size); } } if (android::base::GetProperty("ro.system.build.type", "") != "user") { if (android::base::GetProperty("ro.system.build.type", "") != "user") { Loading