Lines Matching refs:diskobj

60 	struct efi_disk_obj *diskobj;  in efi_disk_rw_blocks()  local
66 diskobj = container_of(this, struct efi_disk_obj, ops); in efi_disk_rw_blocks()
67 desc = (struct blk_desc *) diskobj->desc; in efi_disk_rw_blocks()
70 lba += diskobj->offset; in efi_disk_rw_blocks()
241 struct efi_disk_obj *diskobj; in efi_disk_add_dev() local
248 diskobj = calloc(1, sizeof(*diskobj)); in efi_disk_add_dev()
249 if (!diskobj) in efi_disk_add_dev()
253 efi_add_handle(&diskobj->header); in efi_disk_add_dev()
259 diskobj->dp = efi_dp_append_node(dp_parent, node); in efi_disk_add_dev()
262 diskobj->dp = efi_dp_from_part(desc, part); in efi_disk_add_dev()
264 diskobj->part = part; in efi_disk_add_dev()
265 ret = efi_add_protocol(&diskobj->header, &efi_block_io_guid, in efi_disk_add_dev()
266 &diskobj->ops); in efi_disk_add_dev()
269 ret = efi_add_protocol(&diskobj->header, &efi_guid_device_path, in efi_disk_add_dev()
270 diskobj->dp); in efi_disk_add_dev()
274 diskobj->volume = efi_simple_file_system(desc, part, in efi_disk_add_dev()
275 diskobj->dp); in efi_disk_add_dev()
276 ret = efi_add_protocol(&diskobj->header, in efi_disk_add_dev()
278 diskobj->volume); in efi_disk_add_dev()
282 diskobj->ops = block_io_disk_template; in efi_disk_add_dev()
283 diskobj->ifname = if_typename; in efi_disk_add_dev()
284 diskobj->dev_index = dev_index; in efi_disk_add_dev()
285 diskobj->offset = offset; in efi_disk_add_dev()
286 diskobj->desc = desc; in efi_disk_add_dev()
289 diskobj->media.removable_media = desc->removable; in efi_disk_add_dev()
290 diskobj->media.media_present = 1; in efi_disk_add_dev()
291 diskobj->media.block_size = desc->blksz; in efi_disk_add_dev()
292 diskobj->media.io_align = desc->blksz; in efi_disk_add_dev()
293 diskobj->media.last_block = desc->lba - offset; in efi_disk_add_dev()
295 diskobj->media.logical_partition = 1; in efi_disk_add_dev()
296 diskobj->ops.media = &diskobj->media; in efi_disk_add_dev()
298 *disk = diskobj; in efi_disk_add_dev()