/illumos-gate/usr/src/cmd/format/ |
H A D | menu_fdisk.c | 486 char *mbr; local 502 mbr = malloc(cur_blksz); 503 if (mbr == NULL) { 507 status = read(fd, mbr, cur_blksz); 512 free(mbr); 516 (void) memcpy(&boot_sec, mbr, sizeof (struct mboot)); 517 free(mbr); 683 char *mbr; local 733 mbr = malloc(cur_blksz); 734 if (mbr == NULL) { [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/modules/disk_label/ |
H A D | disk_label.c | 446 mbr_info(struct mboot *mbr, uint_t bpb) in mbr_info() argument 450 if (*((uint16_t *)&mbr->bootinst[GRUB_VERSION_OFF]) == GRUB_VERSION) { in mbr_info() 452 } else if (mbr->bootinst[STAGE1_MBR_VERSION] == LOADER_VERSION) { in mbr_info() 454 } else if (mbr->bootinst[STAGE1_MBR_VERSION] == LOADER_JOYENT_VERSION) { in mbr_info() 473 mdb_printf("Signature: 0x%hx (%s)\n", mbr->signature, in mbr_info() 474 mbr->signature == MBB_MAGIC ? "valid" : "invalid"); in mbr_info() 477 *(uint32_t *)&mbr->bootinst[STAGE1_SIG]); in mbr_info() 483 *(uint64_t *)&mbr->bootinst[STAGE1_STAGE2_LBA]); in mbr_info() 486 *(uint16_t *)&mbr->bootinst[STAGE1_STAGE2_SIZE]); in mbr_info() 488 uuid_unparse((uchar_t *)&mbr->bootinst[STAGE1_STAGE2_UUID], in mbr_info() [all …]
|
/illumos-gate/usr/src/cmd/boot/installboot/i386/ |
H A D | installboot.c | 847 struct mboot *mbr; in print_stage1_cb() local 853 mbr = plist->pl_stage; in print_stage1_cb() 855 if (*((uint16_t *)&mbr->bootinst[GRUB_VERSION_OFF]) == GRUB_VERSION) { in print_stage1_cb() 857 } else if (mbr->bootinst[STAGE1_MBR_VERSION] == LOADER_VERSION) { in print_stage1_cb() 859 } else if (mbr->bootinst[STAGE1_MBR_VERSION] == LOADER_JOYENT_VERSION) { in print_stage1_cb() 863 part = (struct ipart *)mbr->parts; in print_stage1_cb() 891 printf("Signature: 0x%hx (%s)\n", mbr->signature, in print_stage1_cb() 892 mbr->signature == MBB_MAGIC ? "valid" : "invalid"); in print_stage1_cb() 895 *(uint32_t *)&mbr->bootinst[STAGE1_SIG]); in print_stage1_cb() 901 *(uint64_t *)&mbr->bootinst[STAGE1_STAGE2_LBA]); in print_stage1_cb() [all …]
|
/illumos-gate/usr/src/grub/grub-0.97/stage2/ |
H A D | disk_io.c | 461 char mbr[512]; in make_saved_active() local 477 if (! rawread (saved_drive, 0, 0, SECTOR_SIZE, mbr)) in make_saved_active() 482 if (IS_PC_SLICE_TYPE_EXTENDED (PC_SLICE_TYPE (mbr, part))) in make_saved_active() 489 if (PC_SLICE_FLAG (mbr, part) != PC_SLICE_FLAG_BOOTABLE) in make_saved_active() 495 PC_SLICE_FLAG (mbr, i) = 0; in make_saved_active() 498 PC_SLICE_FLAG (mbr, part) = PC_SLICE_FLAG_BOOTABLE; in make_saved_active() 501 if (! rawwrite (saved_drive, 0, mbr)) in make_saved_active() 523 char mbr[512]; in set_partition_hidden_flag() local 543 &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr)) in set_partition_hidden_flag() 556 PC_SLICE_TYPE (mbr, entry) |= PC_SLICE_TYPE_HIDDEN_FLAG; in set_partition_hidden_flag() [all …]
|
H A D | builtins.c | 1430 char mbr[SECTOR_SIZE]; in embed_func() local 1446 if (! rawread (current_drive, PC_MBR_SECTOR, 0, SECTOR_SIZE, mbr)) in embed_func() 1450 if (! PC_MBR_CHECK_SIG (mbr)) in embed_func() 1458 if (PC_SLICE_TYPE (mbr, i) && PC_SLICE_START (mbr, i) - 1 < size) in embed_func() 3279 char mbr[512]; in partnew_func() local 3343 if (! rawread (current_drive, 0, 0, SECTOR_SIZE, mbr)) in partnew_func() 3350 PC_SLICE_FLAG (mbr, entry) = 0; in partnew_func() 3351 PC_SLICE_HEAD (mbr, entry) = start_dh; in partnew_func() 3352 PC_SLICE_SEC (mbr, entry) = start_cl; in partnew_func() 3353 PC_SLICE_CYL (mbr, entry) = start_ch; in partnew_func() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_ctf.c | 858 mbr_info_t mbr; in mdb_ctf_member_info() local 861 mbr.mbr_member = member; in mdb_ctf_member_info() 862 mbr.mbr_offp = offp; in mdb_ctf_member_info() 863 mbr.mbr_typep = typep; in mdb_ctf_member_info() 865 rc = mdb_ctf_member_iter(id, member_info_cb, &mbr); in mdb_ctf_member_info() 1272 member_t mbr; in vread_helper() local 1465 mbr.m_modbuf = modbuf; in vread_helper() 1466 mbr.m_tgtbuf = tgtbuf; in vread_helper() 1467 mbr.m_tgtid = tgtid; in vread_helper() 1468 mbr.m_flags = flags; in vread_helper() [all …]
|
/illumos-gate/usr/src/lib/libnvpair/ |
H A D | nvpair_json.c | 49 mbstate_t mbr; in nvlist_print_json_string() local 53 bzero(&mbr, sizeof (mbr)); in nvlist_print_json_string() 56 while ((sz = mbrtowc(&c, input, MB_CUR_MAX, &mbr)) > 0) { in nvlist_print_json_string()
|
/illumos-gate/usr/src/lib/libefi/common/ |
H A D | rdwr_efi.c | 240 struct mboot *mbr; in efi_alloc_and_read() local 249 if ((mbr = calloc(1, lbsize)) == NULL) in efi_alloc_and_read() 252 if ((ioctl(fd, DKIOCGMBOOT, (caddr_t)mbr)) == -1) { in efi_alloc_and_read() 253 free(mbr); in efi_alloc_and_read() 257 if (mbr->signature != MBB_MAGIC) { in efi_alloc_and_read() 258 free(mbr); in efi_alloc_and_read() 261 ipart = (struct ipart *)(uintptr_t)mbr->parts; in efi_alloc_and_read() 268 free(mbr); in efi_alloc_and_read()
|
/illumos-gate/usr/src/boot/common/ |
H A D | part.c | 74 uint8_t mbr; member 418 if (e1->type.mbr == DOSPTYP_EXT || in ptable_ebrread() 419 e1->type.mbr == DOSPTYP_EXTLBA) in ptable_ebrread() 455 entry->type.mbr = dp[0].dp_typ; in ptable_ebrread() 880 entry->type.mbr = dp[i].dp_typ; in ptable_open() 981 switch (entry->type.mbr) { in ptable_getbestpart()
|
/illumos-gate/usr/src/boot/i386/pmbr/ |
H A D | pmbr.s | 32 # Partly from: src/sys/boot/i386/mbr/mbr.s 1.7
|
/illumos-gate/usr/src/lib/libbe/common/ |
H A D | be_activate.c | 1001 uint16_t mbr = flags & BE_INSTALLBOOT_FLAG_MBR; in be_do_installboot_helper() local 1004 if (mbr == BE_INSTALLBOOT_FLAG_MBR || in be_do_installboot_helper() 1010 if (mbr == BE_INSTALLBOOT_FLAG_MBR || in be_do_installboot_helper()
|
/illumos-gate/usr/src/uts/common/fs/pcfs/ |
H A D | pc_vfsops.c | 1538 #define COPY_PTBL(mbr, ptblp) \ argument 1539 bcopy(&(((struct mboot *)(mbr))->parts), (ptblp), \
|