Lines Matching defs:data

111  * Temporary buffer to store the first 32K of data looking for a multiboot
320 is_update_necessary(ib_data_t *data, char *updt_str)
326 ib_bootblock_t *bblock_file = &data->bootblock;
327 ib_device_t *device = &data->device;
331 assert(data != NULL);
409 * set up data for case stage1 is installed as MBR
414 prepare_stage1(ib_data_t *data)
418 assert(data != NULL);
419 device = &data->device;
423 data->stage1 + STAGE1_BPB_OFFSET, STAGE1_BPB_SIZE);
427 bcopy(device->mbr + STAGE1_SIG, data->stage1 + STAGE1_SIG,
431 *((uint16_t *)(data->stage1 + STAGE1_STAGE2_SIZE)) =
432 (uint16_t)(data->bootblock.buf_size / SECTOR_SIZE);
441 *((uint64_t *)(data->stage1 + STAGE1_STAGE2_LBA)) =
444 *((uint64_t *)(data->stage1 + STAGE1_STAGE2_LBA)) =
452 uuid_generate(data->stage1 + STAGE1_STAGE2_UUID);
458 prepare_bootblock(ib_data_t *data, char *updt_str)
464 assert(data != NULL);
466 bblock = &data->bootblock;
467 device = &data->device;
483 write_bootblock(ib_data_t *data)
485 ib_device_t *device = &data->device;
486 ib_bootblock_t *bblock = &data->bootblock;
492 assert(data != NULL);
557 write_stage1(ib_data_t *data)
559 ib_device_t *device = &data->device;
562 assert(data != NULL);
574 if (write_out(device->stage.fd, data->stage1,
575 sizeof (data->stage1), 0) != BC_SUCCESS) {
596 if (write_out(device->target.fd, data->stage1,
597 sizeof (data->stage1), 0) != BC_SUCCESS) {
617 *((uint16_t *)(data->stage1 + STAGE1_STAGE2_SIZE)) = 1;
618 *((uint64_t *)(data->stage1 + STAGE1_STAGE2_LBA)) =
621 if (write_out(device->fd, data->stage1,
622 sizeof (data->stage1), 0) != BC_SUCCESS) {
1166 * version it with 'updt_str' in the process. Since we cannot trust any data
1213 commit_to_disk(ib_data_t *data, char *update_str)
1215 assert(data != NULL);
1217 if (prepare_bootblock(data, update_str) != BC_SUCCESS) {
1223 if (prepare_stage1(data) != BC_SUCCESS) {
1229 if (write_bootblock(data) != BC_SUCCESS) {
1235 return (write_stage1(data));