Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

BlockMedia

Public Struct
std.os.uefi.protocol.block_io.BlockIo.BlockMedia
pub const BlockMedia = extern struct

Fields

media_id: u32

The current media ID. If the media changes, this value is changed.

removable_media: bool

true if the media is removable; otherwise, false.

media_present: bool

true if there is a media currently present in the device

logical_partition: bool

true if the BlockIo was produced to abstract partition structures on the disk. false if the BlockIo was produced to abstract the logical blocks on a hardware device.

read_only: bool

true if the media is marked read-only otherwise, false. This field shows the read-only status as of the most recent WriteBlocks()

write_caching: bool

true if the WriteBlocks() function caches write data.

block_size: u32

The intrinsic block size of the device. If the media changes, then this

io_align: u32

Supplies the alignment requirement for any buffer used in a data transfer. IoAlign values of 0 and 1 mean that the buffer can be placed anywhere in memory. Otherwise, IoAlign must be a power of 2, and the requirement is that the start address of a buffer must be evenly divisible by IoAlign with no remainder.

last_block: u64

The last LBA on the device. If the media changes, then this field is updated.

lowest_aligned_lba: u64

Revision 2

logical_blocks_per_physical_block: u32
optimal_transfer_length_granularity: u32

File

os/uefi/protocol/block_io.zig:91
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
    pub const BlockMedia = extern struct {
        /// The current media ID. If the media changes, this value is changed.
        media_id: u32,

        /// `true` if the media is removable; otherwise, `false`.
        removable_media: bool,
        /// `true` if there is a media currently present in the device
        media_present: bool,
        /// `true` if the `BlockIo` was produced to abstract
        /// partition structures on the disk. `false` if the `BlockIo` was
        /// produced to abstract the logical blocks on a hardware device.
        logical_partition: bool,
        /// `true` if the media is marked read-only otherwise, `false`. This field
        /// shows the read-only status as of the most recent `WriteBlocks()`
        read_only: bool,
        /// `true` if the WriteBlocks() function caches write data.
        write_caching: bool,

        /// The intrinsic block size of the device. If the media changes, then this
        // field is updated. Returns the number of bytes per logical block.
        block_size: u32,
        /// Supplies the alignment requirement for any buffer used in a data
        /// transfer. IoAlign values of 0 and 1 mean that the buffer can be
        /// placed anywhere in memory. Otherwise, IoAlign must be a power of
        /// 2, and the requirement is that the start address of a buffer must be
        /// evenly divisible by IoAlign with no remainder.
        io_align: u32,
        /// The last LBA on the device. If the media changes, then this field is updated.
        last_block: u64,

        // Revision 2
        lowest_aligned_lba: u64,
        logical_blocks_per_physical_block: u32,
        optimal_transfer_length_granularity: u32,
    }