Lines Matching refs:mbr

191 static void setup_mbr(int img_idx, MBRcontents mbr)  in setup_mbr()  argument
206 if (mbr != mbr_blank) { in setup_mbr()
209 memcpy(buf + 0x1BE, mbr == mbr_lba ? part_lba : part_chs, 16); in setup_mbr()
221 MBRcontents mbr) in setup_ide() argument
230 setup_mbr(img_idx, mbr); in setup_ide()
269 static void test_ide_mbr(bool use_device, MBRcontents mbr) in test_ide_mbr() argument
280 cur_ide[i] = &hd_chst[i][mbr]; in test_ide_mbr()
282 argc = setup_ide(argc, argv, ARGV_SIZE, i, dev, i, mbr); in test_ide_mbr()
423 static char *create_qcow2_with_mbr(MBRpartitions mbr, uint64_t sectors) in create_qcow2_with_mbr() argument
438 status = mbr[i].active ? 0x80 : 0x00; in create_qcow2_with_mbr()
439 g_assert(mbr[i].head < 256); in create_qcow2_with_mbr()
440 g_assert(mbr[i].sector < 64); in create_qcow2_with_mbr()
441 g_assert(mbr[i].cyl < 1024); in create_qcow2_with_mbr()
442 head = mbr[i].head; in create_qcow2_with_mbr()
443 sector = mbr[i].sector + ((mbr[i].cyl & 0x300) >> 2); in create_qcow2_with_mbr()
444 cyl = mbr[i].cyl & 0xff; in create_qcow2_with_mbr()
452 g_assert(mbr[i].end_head < 256); in create_qcow2_with_mbr()
453 g_assert(mbr[i].end_sector < 64); in create_qcow2_with_mbr()
454 g_assert(mbr[i].end_cyl < 1024); in create_qcow2_with_mbr()
455 head = mbr[i].end_head; in create_qcow2_with_mbr()
456 sector = mbr[i].end_sector + ((mbr[i].end_cyl & 0x300) >> 2); in create_qcow2_with_mbr()
457 cyl = mbr[i].end_cyl & 0xff; in create_qcow2_with_mbr()
464 stl_le_p(&buf[offset + 0x8], mbr[i].start_sect); in create_qcow2_with_mbr()
465 stl_le_p(&buf[offset + 0xc], mbr[i].nr_sects); in create_qcow2_with_mbr()
608 MBRpartitions mbr, uint64_t sectors) in add_drive_with_mbr() argument
616 img_file_name = create_qcow2_with_mbr(mbr, sectors); in add_drive_with_mbr()