OSDN Git Service
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