Revert "cli: flash check USB storage sufficiency"
This reverts commit bfd2964023df814670a88bc6e9d02270c9c5bd5b.
Reason for revert: type mismatch
Original change's description:
> cli: flash check USB storage sufficiency
>
> Flashing images onto a USB should have sufficient storage, if it does
> not, raise an error with size details for USB device + image.
>
> BUG=b:231314763
> TEST=./run_tests
>
> Change-Id: Ife5be2d6bab43eac553533dfc64c9c8b885f8997
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3625157
> Tested-by: Jae Hoon Kim <kimjae@chromium.org>
> Reviewed-by: Yuanpeng Ni <yuanpengni@chromium.org>
> Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Bug: b:231314763
Change-Id: Ic5fbdde823a6eb882a9e114e5731320457260fd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3628361
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
diff --git a/cli/flash.py b/cli/flash.py
index 45c8258..dd8514f 100644
--- a/cli/flash.py
+++ b/cli/flash.py
@@ -278,16 +278,8 @@
raise FlashError('No removable devices detected.')
image_path = self._GetImagePath()
- device = self.DeviceNameToPath(target)
-
- device_size_bytes = osutils.GetDeviceSize(device)
- image_size_bytes = os.path.getsize(image_path)
- if device_size_bytes < image_size_bytes:
- raise FlashError(
- 'Removable device %s has less storage (%d) than the image size (%d).'
- % (device, device_size_bytes, image_size_bytes))
-
try:
+ device = self.DeviceNameToPath(target)
self.CopyImageToDevice(image_path, device)
except cros_build_lib.RunCommandError:
logging.error('Failed copying image to device %s',