Lines Matching defs:bootstrapbuf
69 uint8_t *bootstrapbuf;
83 bootstrapbuf = NULL;
128 bootstrapbuf = malloc(bootstrapsize);
129 if (bootstrapbuf == NULL) {
133 memset(bootstrapbuf, 0, bootstrapsize);
138 rv = pread(params->s1fd, bootstrapbuf, params->s1stat.st_size, 0);
147 magic = *(uint32_t *)(bootstrapbuf + 512 * 2 + 4);
163 if (bootstrapbuf[1] == 0xa0 && bootstrapbuf[2] == 0x11 &&
164 (bootstrapbuf[0] == 0x2b /*|| bootstrapbuf[0] == 0x1d*/)) {
165 bpbsize = bootstrapbuf[0] + 2 - MBR_BPB_OFFSET;
174 if (*(uint8_t *)(bootstrapbuf + MBR_PART_OFFSET + i) != 0) {
191 (void)memcpy(bootstrapbuf + MBR_BPB_OFFSET, &mbr.mbr_bpb,
195 memcpy(bootstrapbuf + MBR_PART_OFFSET, &mbr.mbr_parts,
204 bpp = (void *)(bootstrapbuf + 512 * 2 + 8);
231 rv = pwrite(params->fsfd, bootstrapbuf, 512, 0);
243 rv = pwrite(params->fsfd, bootstrapbuf + 512 * 2,
256 if (bootstrapbuf)
257 free(bootstrapbuf);