Lines Matching refs:bootinst
80 unsigned char *bootinst; /* boot code */ member
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()
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()
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()
891 dos_partition_enc(&mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE], in write_s0()
893 le16enc(&mboot.bootinst[DOSMAGICOFFSET], DOSMAGIC); in write_s0()
896 &mboot.bootinst[sector * secsize]) == -1) { in write_s0()