new change to fix infinite loop on YAFFS2 detection - correct casting