Lines Matching refs:mboot

79 struct mboot {  struct
85 static struct mboot mboot; variable
337 if ((mboot.bootinst = malloc(MAX_SEC_SIZE)) == NULL) in main()
339 if (read_disk(0, mboot.bootinst) == -1) in main()
341 free(mboot.bootinst); in main()
342 mboot.bootinst = NULL; in main()
352 partp = &mboot.parts[i]; in main()
373 partp = &mboot.parts[i]; in main()
390 partp = &mboot.parts[0]; in main()
474 print_part(&mboot.parts[i - 1]); in print_s0()
526 if ((mboot.bootinst_size = sb.st_size) % secsize != 0) in init_boot()
528 if (mboot.bootinst != NULL) in init_boot()
529 free(mboot.bootinst); in init_boot()
530 if ((mboot.bootinst = malloc(mboot.bootinst_size = sb.st_size)) == NULL) in init_boot()
532 if ((n = read(fdesc, mboot.bootinst, mboot.bootinst_size)) == -1 || in init_boot()
535 if (n != mboot.bootinst_size) in init_boot()
543 struct dos_partition *partp = &mboot.parts[0]; in init_sector0()
561 struct dos_partition *partp = &mboot.parts[i - 1]; in change_part()
633 struct dos_partition *partp = &mboot.parts[0]; in change_active()
857 mboot.bootinst_size = secsize; in read_s0()
858 if (mboot.bootinst != NULL) in read_s0()
859 free(mboot.bootinst); in read_s0()
860 if ((mboot.bootinst = malloc(mboot.bootinst_size)) == NULL) { in read_s0()
865 if (read_disk(0, mboot.bootinst) == -1) { in read_s0()
869 if (le16dec(&mboot.bootinst[DOSMAGICOFFSET]) != DOSMAGIC) { in read_s0()
876 &mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE], in read_s0()
877 &mboot.parts[i]); in read_s0()
891 dos_partition_enc(&mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE], in write_s0()
892 &mboot.parts[i]); in write_s0()
893 le16enc(&mboot.bootinst[DOSMAGICOFFSET], DOSMAGIC); in write_s0()
894 for(sector = 0; sector < mboot.bootinst_size / secsize; sector++) in write_s0()
896 &mboot.bootinst[sector * secsize]) == -1) { in write_s0()
1151 partp = &mboot.parts[partition - 1]; in process_partition()
1161 &mboot.parts) + i - 1; in process_partition()
1292 partp = mboot.parts; in process_active()
1388 partp = &mboot.parts[i]; in reset_boot()