|
iPXE
|
Block devices. More...
Go to the source code of this file.
Data Structures | |
| struct | block_device_capacity |
| Block device capacity. More... | |
Macros | |
| #define | block_read_TYPE(object_type) |
| #define | block_write_TYPE(object_type) |
| #define | block_read_capacity_TYPE(object_type) typeof ( int ( object_type, struct interface *data ) ) |
| #define | block_capacity_TYPE(object_type) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| int | block_read (struct interface *control, struct interface *data, uint64_t lba, unsigned int count, void *buffer, size_t len) |
| Read from block device. More... | |
| int | block_write (struct interface *control, struct interface *data, uint64_t lba, unsigned int count, void *buffer, size_t len) |
| Write to block device. More... | |
| int | block_read_capacity (struct interface *control, struct interface *data) |
| Read block device capacity. More... | |
| void | block_capacity (struct interface *intf, struct block_device_capacity *capacity) |
| Report block device capacity. More... | |
Block devices.
Definition in file blockdev.h.
| #define block_read_TYPE | ( | object_type | ) |
Definition at line 29 of file blockdev.h.
| #define block_write_TYPE | ( | object_type | ) |
Definition at line 37 of file blockdev.h.
| #define block_read_capacity_TYPE | ( | object_type | ) | typeof ( int ( object_type, struct interface *data ) ) |
Definition at line 44 of file blockdev.h.
| #define block_capacity_TYPE | ( | object_type | ) |
Definition at line 49 of file blockdev.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| int block_read | ( | struct interface * | control, |
| struct interface * | data, | ||
| uint64_t | lba, | ||
| unsigned int | count, | ||
| void * | buffer, | ||
| size_t | len | ||
| ) |
Read from block device.
| control | Control interface |
| data | Data interface |
| lba | Starting logical block address |
| count | Number of logical blocks |
| buffer | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 47 of file blockdev.c.
References block_read(), block_read_TYPE, buffer, control, count, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), lba, len, op, and rc.
Referenced by block_read(), and sandev_read().
| int block_write | ( | struct interface * | control, |
| struct interface * | data, | ||
| uint64_t | lba, | ||
| unsigned int | count, | ||
| void * | buffer, | ||
| size_t | len | ||
| ) |
Write to block device.
| control | Control interface |
| data | Data interface |
| lba | Starting logical block address |
| count | Number of logical blocks |
| buffer | Data buffer |
| len | Length of data buffer |
| rc | Return status code |
Definition at line 78 of file blockdev.c.
References block_write(), block_write_TYPE, buffer, control, count, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), lba, len, op, and rc.
Referenced by block_write(), and sandev_write().
Read block device capacity.
| control | Control interface |
| data | Data interface |
| rc | Return status code |
Definition at line 105 of file blockdev.c.
References block_read_capacity(), block_read_capacity_TYPE, control, data, dest, EOPNOTSUPP, intf_get_dest_op, intf_object(), intf_put(), op, and rc.
Referenced by block_read_capacity(), and sandev_command_read_capacity().
| void block_capacity | ( | struct interface * | intf, |
| struct block_device_capacity * | capacity | ||
| ) |
Report block device capacity.
| intf | Interface |
| capacity | Block device capacity |
Definition at line 129 of file blockdev.c.
References block_capacity(), block_capacity_TYPE, dest, interface::intf, intf_get_dest_op, intf_object(), intf_put(), and op.
Referenced by atacmd_identify_done(), blktrans_close(), block_capacity(), and scsicmd_read_capacity_done().
1.8.15