Lines Matching defs:mboot
133 static struct mbr_sector mboot;
562 if (read_s0(0, &mboot))
713 print_part(&mboot, part, 0);
733 if (!sh_flag && mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC) {
737 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ACTIVE) {
739 tmo = le16toh(mboot.mbr_bootsel.mbrbs_timeo);
759 le32toh(mboot.mbr_dsn),
760 le32toh(mboot.mbr_dsn));
774 print_part(&mboot, which, 0);
790 if (boot != &mboot) {
1127 if (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC
1134 memcpy(&mboot, bootcode, copy_size);
1135 mboot.mbr_bootsel_magic = bootcode[0].mbr_bootsel_magic;
1137 mboot.mbr_magic = LE_MBR_MAGIC;
1142 memset(&mboot.mbr_parts[i], 0, sizeof(mboot.mbr_parts[i]));
1153 for (mp = mboot.mbr_parts; !MBR_IS_EXTENDED(mp->mbrp_type); mp++)
1154 if (mp >= &mboot.mbr_parts[MBR_PART_COUNT])
1163 ext.ptn_id = mp - mboot.mbr_parts;
1249 struct mbr_partition *partp = &mboot.mbr_parts[0];
1337 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1341 id = mboot.mbr_bootsel.mbrbs_defkey;
1343 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ASCII) {
1364 if (mboot.mbr_parts[p].mbrp_type == 0)
1366 if (mboot.mbr_bootsel.mbrbs_nametab[p][0] == 0)
1369 return le32toh(mboot.mbr_parts[p].mbrp_start);
1393 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1397 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_ASCII)
1402 mboot.mbr_bootsel.mbrbs_defkey = key[0];
1408 mboot.mbr_bootsel.mbrbs_defkey = key[1]
1413 mboot.mbr_bootsel.mbrbs_defkey = key[2];
1415 if (mboot.mbr_parts[p].mbrp_type == 0)
1417 if (mboot.mbr_bootsel.mbrbs_nametab[p][0] == 0)
1419 if (le32toh(mboot.mbr_parts[p].mbrp_start) == default_ptn)
1421 mboot.mbr_bootsel.mbrbs_defkey++;
1424 if (mboot.mbr_bootsel.mbrbs_flags & MBR_BS_EXTLBA) {
1433 mboot.mbr_bootsel.mbrbs_defkey++;
1438 mboot.mbr_bootsel.mbrbs_defkey = key[0];
1444 struct mbr_bootsel *mbs = &mboot.mbr_bootsel;
1453 if (mboot.mbr_parts[p].mbrp_type == 0)
1455 if (mboot.mbr_bootsel_magic != LE_MBR_BS_MAGIC)
1460 if (le32toh(mboot.mbr_parts[p].mbrp_start) >= dos_totalsectors)
1479 (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC
1541 if (mboot.mbr_bootsel_magic == LE_MBR_BS_MAGIC)
1548 struct mbr_bootsel *mbs = &mboot.mbr_bootsel;
1586 if (mboot.mbr_parts[i].mbrp_type == 0)
1591 off[opt] = le32toh(mboot.mbr_parts[i].mbrp_start);
1626 * have been read (i.e. dos_* and mboot are meaningful).
1752 struct mbr_partition *part = &mboot.mbr_parts[i / 2];
1789 mboot.mbr_parts[part].mbrp_type = 0;
1867 if (p == part || mboot.mbr_parts[p].mbrp_type == 0)
1869 p_s = le32toh(mboot.mbr_parts[p].mbrp_start);
1870 p_e = p_s + le32toh(mboot.mbr_parts[p].mbrp_size);
1883 if (!MBR_IS_EXTENDED(mboot.mbr_parts[part].mbrp_type)) {
1928 if (le32toh(mboot.mbr_parts[part].mbrp_start) != ext.base)
2051 boot = &mboot;
2123 if (mboot.mbr_parts[p].mbrp_type == 0)
2125 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2127 start < n_s + le32toh(mboot.mbr_parts[p].mbrp_size))
2134 if (mboot.mbr_parts[p].mbrp_type == 0)
2136 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2137 n_e = n_s + le32toh(mboot.mbr_parts[p].mbrp_size);
2195 if (mboot.mbr_parts[p].mbrp_type == 0)
2197 n_s = le32toh(mboot.mbr_parts[p].mbrp_start);
2201 + le32toh(mboot.mbr_parts[p].mbrp_size)) {
2402 struct mbr_partition *partp = &mboot.mbr_parts[0];
2418 partp = &mboot.mbr_parts[0];
2787 else if (mboot.mbr_parts[id].mbrp_type != 0)
2818 if (write_disk(0, &mboot) == -1) {