Try to set a sensible maximum size for yaffs2 to scan, so we
don't scan terabytes of empty disk data for something that
looks like yaffs2. Currently set to 64GB.
Rename YAFFS_MAX_SIZE to YAFFS_MAX_SCAN_SIZE, which is what it really is.
Merge pull request #228 from kefir-/limit-yaffs-scan

Limit yaffs2 initial scan for blank images
new change to fix infinite loop on YAFFS2 detection - correct casting
fixed crashing bug on UFS/extX