mozilla-b2g/gonk-misc — pull request #164 by lissyx (2014-05-08 09:32:28+00:00)
Title: Bug 1007570 - Improve fstab type heuristic detection

The Flame seems to rely on a recovery fstab that follows the Linux file
format but is named like an Android recovery file format fstab. This
makes out previous heuristic failing to correctly extracts the
partitions. Hence, we switch to something a bit more robust there:
- probe the fstab file for any line that contains '/system' and that
starts with '/dev'
- if we find any such line, then it means this fstab file follows linux
file format, and we extract the partition from the first member of
the file
- if we don't findany, it means we have an fstab file that follows
Android file format, and we extract the partition from the third
member of the file