OSDN Git Service

Mksdcard: Sanity check size, better error messages.
authorRaphael Moll <ralf@android.com>
Thu, 17 Feb 2011 21:43:30 +0000 (13:43 -0800)
committerRaphael Moll <ralf@android.com>
Thu, 17 Feb 2011 22:10:37 +0000 (14:10 -0800)
commitda9ed4b33f73c0dc55cd008536e08f8b9bf3cb24
treee76909de0f4648b8cf914edd7ede8b37a5f24597
parent7c6a3d2fa9361fdd473d74f4e335bdbd914a95e5
Mksdcard: Sanity check size, better error messages.

Fixes:
- Issue 13277: mksdcard fails to create insanely large sdcard.
- Issue 14429: better error message when disk full.

Details:
- Actually report fopen/fwrite errors (instead of silently failing.)
  This alone fixes the 2 reported issues.
- Check size argument parsed correctly and isn't larger than
  the FAT format can handle.
- Actually indicate in the usage text the min/max size values.
- Added support for a 'G' postfix, to make gigabyte sdcards.

Change-Id: I4986c2c7c031f3b9bfd580b015b56d741aba778f
emulator/mksdcard/mksdcard.c