Fix division-by-zero when reading partition tables

When fsck_msdos was asked to analyze a device that contained
a partition table in its first sector fsck_msdos was doing a
division-by-zero because of mostly zeroed out fields. This
fix postpones the division until it is necessary, while
other tests already present detect the zeroed out fields and
so fsck_msdos fails in a controlled fashion.

Change-Id: Id2274b140449f4470f95a0215277f2f2de4cb7b0
Signed-off-by: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com>
Signed-off-by: christian bejram <christian.bejram@stericsson.com>
1 file changed