Lines Matching defs:mboot
133 static struct mbr_sector mboot;
548 if (read_s0(0, &mboot))
699 print_part(&mboot, part, 0);
719 if (!sh_flag && mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC) {
723 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ACTIVE) {
725 tmo = le16toh(mboot.mbr_bootsel.mbrbs_timeo);
745 le32toh(mboot.mbr_dsn),
746 le32toh(mboot.mbr_dsn));
760 print_part(&mboot, which, 0);
776 if (boot != &mboot) {
1110 if (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC
1117 memcpy(&mboot, bootcode, copy_size);
1118 mboot.mbr_bootsel_magic = bootcode[0].mbr_bootsel_magic;
1120 mboot.mbr_magic = LE_MBR_MAGIC;
1125 memset(&mboot.mbr_parts[i], 0, sizeof(mboot.mbr_parts[i]));
1136 for (mp = mboot.mbr_parts; !MBR_IS_EXTENDED(mp->mbrp_type); mp++)
1137 if (mp >= &mboot.mbr_parts[MBR_PART_COUNT])
1146 ext.ptn_id = mp - mboot.mbr_parts;
1232 struct mbr_partition *partp = &mboot.mbr_parts[0];
1320 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1324 id = mboot.mbr_bootsel.mbrbs_defkey;
1326 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ASCII) {
1347 if (mboot.mbr_parts[p].mbrp_type == 0)
1349 if (mboot.mbr_bootsel.mbrbs_nametab[p][0] == 0)
1352 return le32toh(mboot.mbr_parts[p].mbrp_start);
1376 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1380 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ASCII)
1385 mboot.mbr_bootsel.mbrbs_defkey = key[0];
1391 mboot.mbr_bootsel.mbrbs_defkey = key[1]
1396 mboot.mbr_bootsel.mbrbs_defkey = key[2];
1398 if (mboot.mbr_parts[p].mbrp_type == 0)
1400 if (mboot.mbr_bootsel.mbrbs_nametab[p][0] == 0)
1402 if (le32toh(mboot.mbr_parts[p].mbrp_start) == default_ptn)
1404 mboot.mbr_bootsel.mbrbs_defkey++;
1407 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_EXTLBA) {
1416 mboot.mbr_bootsel.mbrbs_defkey++;
1421 mboot.mbr_bootsel.mbrbs_defkey = key[0];
1427 struct mbr_bootsel *mbs = &mboot.mbr_bootsel;
1436 if (mboot.mbr_parts[p].mbrp_type == 0)
1438 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1443 if (le32toh(mboot.mbr_parts[p].mbrp_start) >= dos_totalsectors)
1462 (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC
1524 if (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC)
1531 struct mbr_bootsel *mbs = &mboot.mbr_bootsel;
1569 if (mboot.mbr_parts[i].mbrp_type == 0)
1574 off[opt] = le32toh(mboot.mbr_parts[i].mbrp_start);
1609 * have been read (i.e. dos_* and mboot are meaningful).
1735 struct mbr_partition *part = &mboot.mbr_parts[i / 2];
1772 mboot.mbr_parts[part].mbrp_type = 0;
1850 if (p == part || mboot.mbr_parts[p].mbrp_type == 0)
1852 p_s = le32toh(mboot.mbr_parts[p].mbrp_start);
1853 p_e = p_s + le32toh(mboot.mbr_parts[p].mbrp_size);
1866 if (!MBR_IS_EXTENDED(mboot.mbr_parts[part].mbrp_type)) {
1911 if (le32toh(mboot.mbr_parts[part].mbrp_start) != ext.base)
2034 boot = &mboot;
2106 if (mboot.mbr_parts[p].mbrp_type == 0)
2108 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2110 start < n_s + le32toh(mboot.mbr_parts[p].mbrp_size))
2117 if (mboot.mbr_parts[p].mbrp_type == 0)
2119 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2120 n_e = n_s + le32toh(mboot.mbr_parts[p].mbrp_size);
2178 if (mboot.mbr_parts[p].mbrp_type == 0)
2180 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2184 + le32toh(mboot.mbr_parts[p].mbrp_size)) {
2385 struct mbr_partition *partp = &mboot.mbr_parts[0];
2401 partp = &mboot.mbr_parts[0];
2761 else if (mboot.mbr_parts[id].mbrp_type != 0)
2792 if (write_disk(0, &mboot) == -1) {