Lines Matching defs:bootinst
80 unsigned char *bootinst; /* boot code */
336 /* (abu)use mboot.bootinst to probe for the sector size */
337 if ((mboot.bootinst = malloc(MAX_SEC_SIZE)) == NULL)
339 if (read_disk(0, mboot.bootinst) == -1)
341 free(mboot.bootinst);
342 mboot.bootinst = NULL;
528 if (mboot.bootinst != NULL)
529 free(mboot.bootinst);
530 if ((mboot.bootinst = malloc(mboot.bootinst_size = sb.st_size)) == NULL)
532 if ((n = read(fdesc, mboot.bootinst, mboot.bootinst_size)) == -1 ||
858 if (mboot.bootinst != NULL)
859 free(mboot.bootinst);
860 if ((mboot.bootinst = malloc(mboot.bootinst_size)) == NULL) {
865 if (read_disk(0, mboot.bootinst) == -1) {
869 if (le16dec(&mboot.bootinst[DOSMAGICOFFSET]) != DOSMAGIC) {
876 &mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE],
891 dos_partition_enc(&mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE],
893 le16enc(&mboot.bootinst[DOSMAGICOFFSET], DOSMAGIC);
896 &mboot.bootinst[sector * secsize]) == -1) {