Lines Matching refs:mbr

586 read_mbr_template(char *path, uint8_t *mbr)  in read_mbr_template()  argument
595 ret = fread(mbr, 1, MBRSIZE, fp); in read_mbr_template()
603 initialise_mbr(uint8_t *mbr) in initialise_mbr() argument
607 uint8_t ptype = 0, *rbm = mbr; in initialise_mbr()
616 read_mbr_template(mbr_template_path, mbr); in initialise_mbr()
625 memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); in initialise_mbr()
632 memcpy(mbr, afp_header, sizeof(afp_header)); in initialise_mbr()
641 mbr += MBRSIZE; /* offset 432 */ in initialise_mbr()
644 memcpy(mbr, &tmp, sizeof(tmp)); in initialise_mbr()
645 mbr += sizeof(tmp); /* offset 436 */ in initialise_mbr()
648 memcpy(mbr, &tmp, sizeof(tmp)); in initialise_mbr()
649 mbr += sizeof(tmp); /* offset 440 */ in initialise_mbr()
652 memcpy(mbr, &tmp, sizeof(tmp)); in initialise_mbr()
653 mbr += sizeof(tmp); /* offset 444 */ in initialise_mbr()
655 mbr[0] = '\0'; in initialise_mbr()
656 mbr[1] = '\0'; in initialise_mbr()
657 mbr += 2; /* offset 446 */ in initialise_mbr()
675 memset(mbr, 0, 16); in initialise_mbr()
678 mbr[0] = 0x80; in initialise_mbr()
679 mbr[1] = bhead; in initialise_mbr()
680 mbr[2] = bsect; in initialise_mbr()
681 mbr[3] = bcyle; in initialise_mbr()
682 mbr[4] = ptype; in initialise_mbr()
683 mbr[5] = ehead; in initialise_mbr()
684 mbr[6] = esect; in initialise_mbr()
685 mbr[7] = ecyle; in initialise_mbr()
688 memcpy(&mbr[8], &tmp, sizeof(tmp)); in initialise_mbr()
691 memcpy(&mbr[12], &tmp, sizeof(tmp)); in initialise_mbr()
695 mbr[0] = 0x0; in initialise_mbr()
696 mbr[1] = 0xfe; in initialise_mbr()
697 mbr[2] = 0xff; in initialise_mbr()
698 mbr[3] = 0xff; in initialise_mbr()
699 mbr[4] = 0xef; in initialise_mbr()
700 mbr[5] = 0xfe; in initialise_mbr()
701 mbr[6] = 0xff; in initialise_mbr()
702 mbr[7] = 0xff; in initialise_mbr()
705 memcpy(&mbr[8], &tmp, sizeof(tmp)); in initialise_mbr()
708 memcpy(&mbr[12], &tmp, sizeof(tmp)); in initialise_mbr()
712 mbr[0] = 0x0; in initialise_mbr()
713 mbr[1] = 0xfe; in initialise_mbr()
714 mbr[2] = 0xff; in initialise_mbr()
715 mbr[3] = 0xff; in initialise_mbr()
716 mbr[4] = 0x0; in initialise_mbr()
717 mbr[5] = 0xfe; in initialise_mbr()
718 mbr[6] = 0xff; in initialise_mbr()
719 mbr[7] = 0xff; in initialise_mbr()
722 memcpy(&mbr[8], &tmp, sizeof(tmp)); in initialise_mbr()
725 memcpy(&mbr[12], &tmp, sizeof(tmp)); in initialise_mbr()
727 mbr += 16; in initialise_mbr()
729 mbr[0] = 0x55; in initialise_mbr()
730 mbr[1] = 0xAA; in initialise_mbr()
731 mbr += 2; in initialise_mbr()
733 return mbr - rbm; in initialise_mbr()
737 display_mbr(const uint8_t *mbr, size_t len) in display_mbr() argument
751 c = mbr[i]; in display_mbr()
758 printf("%c", isprint(mbr[j]) ? mbr[j] : '.'); in display_mbr()