Lines Matching refs:diskobj
57 struct efi_disk_obj *diskobj; in efi_disk_rw_blocks() local
63 diskobj = container_of(this, struct efi_disk_obj, ops); in efi_disk_rw_blocks()
64 desc = (struct blk_desc *) diskobj->desc; in efi_disk_rw_blocks()
67 lba += diskobj->offset; in efi_disk_rw_blocks()
238 struct efi_disk_obj *diskobj; in efi_disk_add_dev() local
245 diskobj = calloc(1, sizeof(*diskobj)); in efi_disk_add_dev()
246 if (!diskobj) in efi_disk_add_dev()
250 efi_add_handle(&diskobj->parent); in efi_disk_add_dev()
256 diskobj->dp = efi_dp_append_node(dp_parent, node); in efi_disk_add_dev()
259 diskobj->dp = efi_dp_from_part(desc, part); in efi_disk_add_dev()
261 diskobj->part = part; in efi_disk_add_dev()
262 ret = efi_add_protocol(diskobj->parent.handle, &efi_block_io_guid, in efi_disk_add_dev()
263 &diskobj->ops); in efi_disk_add_dev()
266 ret = efi_add_protocol(diskobj->parent.handle, &efi_guid_device_path, in efi_disk_add_dev()
267 diskobj->dp); in efi_disk_add_dev()
271 diskobj->volume = efi_simple_file_system(desc, part, in efi_disk_add_dev()
272 diskobj->dp); in efi_disk_add_dev()
273 ret = efi_add_protocol(diskobj->parent.handle, in efi_disk_add_dev()
275 diskobj->volume); in efi_disk_add_dev()
279 diskobj->ops = block_io_disk_template; in efi_disk_add_dev()
280 diskobj->ifname = if_typename; in efi_disk_add_dev()
281 diskobj->dev_index = dev_index; in efi_disk_add_dev()
282 diskobj->offset = offset; in efi_disk_add_dev()
283 diskobj->desc = desc; in efi_disk_add_dev()
286 diskobj->media.removable_media = desc->removable; in efi_disk_add_dev()
287 diskobj->media.media_present = 1; in efi_disk_add_dev()
288 diskobj->media.block_size = desc->blksz; in efi_disk_add_dev()
289 diskobj->media.io_align = desc->blksz; in efi_disk_add_dev()
290 diskobj->media.last_block = desc->lba - offset; in efi_disk_add_dev()
292 diskobj->media.logical_partition = 1; in efi_disk_add_dev()
293 diskobj->ops.media = &diskobj->media; in efi_disk_add_dev()
295 *disk = diskobj; in efi_disk_add_dev()