Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM

if the probe succeeds. This guarantees that the BSD scheme
wins over the MBR scheme when MBR gets to probe first. Build-
or link-time conditions can cause schemes to end up in the
linker set in a different order. Normally BSD is before MBR
in the linker set and as such get to probe first. But typically
when the kernel gets rebuild or relinked, this can change.
This commit is contained in:
Marcel Moolenaar 2008-09-29 02:48:22 +00:00
parent 1e2fbcfa44
commit a87faebb8c

View File

@ -293,7 +293,7 @@ g_part_bsd_probe(struct g_part_table *table, struct g_consumer *cp)
magic2 = le32dec(buf + 132);
g_free(buf);
return ((magic1 == DISKMAGIC && magic2 == DISKMAGIC)
? G_PART_PROBE_PRI_NORM : ENXIO);
? G_PART_PROBE_PRI_HIGH : ENXIO);
}
static int