Files
OpenCellular/user_tools/linux
Bill Richardson 9880ca5a03 Check for enough room in /tmp, warn about too-small USB drives.
BUG=chromium-os:10062
TEST=manual

Verify the tempdir check by specifying a working directory on a filesystem
that's too small. It should complain:

  dd if=/dev/zero bs=1M count=3 of=foo
  mkfs.ext2 foo
  mount -o loop foo /mnt
  WORKDIR=/mnt ./recovery.sh

Verify the too-small USB check by selecting one that's too small. It won't
stop you, but will warn you like this:

  I found 2 USB drives.  We need one with at least 927MB capacity.

  0 - <quit>

  1 - Use /dev/sdc 4051MB SanDisk  U3 Cruzer Micro

  2 - Use /dev/sdd 32MB M-Sys    DiskOnKey

  Tell me what to do (or just press Enter to scan again): 2

  WARNING: This drive seems too small (31MB). The recovery image is 927MB.

  Is this the device you want to put the recovery image on?

    /dev/sdd 32MB M-Sys    DiskOnKey

  You must enter 'YES' (all uppercase) to continue: ^C

Change-Id: I7cf78b5b69eba696d911ca8ee371909bcf3201c7

Review URL: http://codereview.chromium.org/5720007
2010-12-14 15:13:09 -08:00
..