| 1 |
|
| 2 |
|
| 3 |
#[repr(C)] |
| 4 |
#[derive(Default)] |
| 5 |
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); |
| 6 |
impl<T> __IncompleteArrayField<T> { |
| 7 |
#[inline] |
| 8 |
pub const fn new() -> Self { |
| 9 |
__IncompleteArrayField(::std::marker::PhantomData, []) |
| 10 |
} |
| 11 |
#[inline] |
| 12 |
pub fn as_ptr(&self) -> *const T { |
| 13 |
self as *const _ as *const T |
| 14 |
} |
| 15 |
#[inline] |
| 16 |
pub fn as_mut_ptr(&mut self) -> *mut T { |
| 17 |
self as *mut _ as *mut T |
| 18 |
} |
| 19 |
#[inline] |
| 20 |
pub unsafe fn as_slice(&self, len: usize) -> &[T] { |
| 21 |
::std::slice::from_raw_parts(self.as_ptr(), len) |
| 22 |
} |
| 23 |
#[inline] |
| 24 |
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { |
| 25 |
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) |
| 26 |
} |
| 27 |
} |
| 28 |
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> { |
| 29 |
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| 30 |
fmt.write_str("__IncompleteArrayField") |
| 31 |
} |
| 32 |
} |
| 33 |
pub const VIRTIO_BLK_F_SIZE_MAX: u32 = 1; |
| 34 |
pub const VIRTIO_BLK_F_SEG_MAX: u32 = 2; |
| 35 |
pub const VIRTIO_BLK_F_GEOMETRY: u32 = 4; |
| 36 |
pub const VIRTIO_BLK_F_RO: u32 = 5; |
| 37 |
pub const VIRTIO_BLK_F_BLK_SIZE: u32 = 6; |
| 38 |
pub const VIRTIO_BLK_F_TOPOLOGY: u32 = 10; |
| 39 |
pub const VIRTIO_BLK_F_MQ: u32 = 12; |
| 40 |
pub const VIRTIO_BLK_F_DISCARD: u32 = 13; |
| 41 |
pub const VIRTIO_BLK_F_WRITE_ZEROES: u32 = 14; |
| 42 |
pub const VIRTIO_BLK_F_SECURE_ERASE: u32 = 16; |
| 43 |
pub const VIRTIO_BLK_F_ZONED: u32 = 17; |
| 44 |
pub const VIRTIO_BLK_F_BARRIER: u32 = 0; |
| 45 |
pub const VIRTIO_BLK_F_SCSI: u32 = 7; |
| 46 |
pub const VIRTIO_BLK_F_FLUSH: u32 = 9; |
| 47 |
pub const VIRTIO_BLK_F_CONFIG_WCE: u32 = 11; |
| 48 |
pub const VIRTIO_BLK_F_WCE: u32 = 9; |
| 49 |
pub const VIRTIO_BLK_ID_BYTES: u32 = 20; |
| 50 |
pub const VIRTIO_BLK_T_IN: u32 = 0; |
| 51 |
pub const VIRTIO_BLK_T_OUT: u32 = 1; |
| 52 |
pub const VIRTIO_BLK_T_SCSI_CMD: u32 = 2; |
| 53 |
pub const VIRTIO_BLK_T_FLUSH: u32 = 4; |
| 54 |
pub const VIRTIO_BLK_T_GET_ID: u32 = 8; |
| 55 |
pub const VIRTIO_BLK_T_DISCARD: u32 = 11; |
| 56 |
pub const VIRTIO_BLK_T_WRITE_ZEROES: u32 = 13; |
| 57 |
pub const VIRTIO_BLK_T_SECURE_ERASE: u32 = 14; |
| 58 |
pub const VIRTIO_BLK_T_ZONE_APPEND: u32 = 15; |
| 59 |
pub const VIRTIO_BLK_T_ZONE_REPORT: u32 = 16; |
| 60 |
pub const VIRTIO_BLK_T_ZONE_OPEN: u32 = 18; |
| 61 |
pub const VIRTIO_BLK_T_ZONE_CLOSE: u32 = 20; |
| 62 |
pub const VIRTIO_BLK_T_ZONE_FINISH: u32 = 22; |
| 63 |
pub const VIRTIO_BLK_T_ZONE_RESET: u32 = 24; |
| 64 |
pub const VIRTIO_BLK_T_ZONE_RESET_ALL: u32 = 26; |
| 65 |
pub const VIRTIO_BLK_T_BARRIER: u32 = 2147483648; |
| 66 |
pub const VIRTIO_BLK_Z_NONE: u32 = 0; |
| 67 |
pub const VIRTIO_BLK_Z_HM: u32 = 1; |
| 68 |
pub const VIRTIO_BLK_Z_HA: u32 = 2; |
| 69 |
pub const VIRTIO_BLK_ZT_CONV: u32 = 1; |
| 70 |
pub const VIRTIO_BLK_ZT_SWR: u32 = 2; |
| 71 |
pub const VIRTIO_BLK_ZT_SWP: u32 = 3; |
| 72 |
pub const VIRTIO_BLK_ZS_NOT_WP: u32 = 0; |
| 73 |
pub const VIRTIO_BLK_ZS_EMPTY: u32 = 1; |
| 74 |
pub const VIRTIO_BLK_ZS_IOPEN: u32 = 2; |
| 75 |
pub const VIRTIO_BLK_ZS_EOPEN: u32 = 3; |
| 76 |
pub const VIRTIO_BLK_ZS_CLOSED: u32 = 4; |
| 77 |
pub const VIRTIO_BLK_ZS_RDONLY: u32 = 13; |
| 78 |
pub const VIRTIO_BLK_ZS_FULL: u32 = 14; |
| 79 |
pub const VIRTIO_BLK_ZS_OFFLINE: u32 = 15; |
| 80 |
pub const VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP: u32 = 1; |
| 81 |
pub const VIRTIO_BLK_S_OK: u32 = 0; |
| 82 |
pub const VIRTIO_BLK_S_IOERR: u32 = 1; |
| 83 |
pub const VIRTIO_BLK_S_UNSUPP: u32 = 2; |
| 84 |
pub const VIRTIO_BLK_S_ZONE_INVALID_CMD: u32 = 3; |
| 85 |
pub const VIRTIO_BLK_S_ZONE_UNALIGNED_WP: u32 = 4; |
| 86 |
pub const VIRTIO_BLK_S_ZONE_OPEN_RESOURCE: u32 = 5; |
| 87 |
pub const VIRTIO_BLK_S_ZONE_ACTIVE_RESOURCE: u32 = 6; |
| 88 |
pub type __u8 = ::std::os::raw::c_uchar; |
| 89 |
pub type __u16 = ::std::os::raw::c_ushort; |
| 90 |
pub type __u32 = ::std::os::raw::c_uint; |
| 91 |
pub type __u64 = ::std::os::raw::c_ulonglong; |
| 92 |
pub type __le32 = __u32; |
| 93 |
pub type __le64 = __u64; |
| 94 |
pub type __virtio16 = __u16; |
| 95 |
pub type __virtio32 = __u32; |
| 96 |
pub type __virtio64 = __u64; |
| 97 |
#[repr(C, packed)] |
| 98 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 99 |
pub struct virtio_blk_config { |
| 100 |
pub capacity: __virtio64, |
| 101 |
pub size_max: __virtio32, |
| 102 |
pub seg_max: __virtio32, |
| 103 |
pub geometry: virtio_blk_config_virtio_blk_geometry, |
| 104 |
pub blk_size: __virtio32, |
| 105 |
pub physical_block_exp: __u8, |
| 106 |
pub alignment_offset: __u8, |
| 107 |
pub min_io_size: __virtio16, |
| 108 |
pub opt_io_size: __virtio32, |
| 109 |
pub wce: __u8, |
| 110 |
pub unused: __u8, |
| 111 |
pub num_queues: __virtio16, |
| 112 |
pub max_discard_sectors: __virtio32, |
| 113 |
pub max_discard_seg: __virtio32, |
| 114 |
pub discard_sector_alignment: __virtio32, |
| 115 |
pub max_write_zeroes_sectors: __virtio32, |
| 116 |
pub max_write_zeroes_seg: __virtio32, |
| 117 |
pub write_zeroes_may_unmap: __u8, |
| 118 |
pub unused1: [__u8; 3usize], |
| 119 |
pub max_secure_erase_sectors: __virtio32, |
| 120 |
pub max_secure_erase_seg: __virtio32, |
| 121 |
pub secure_erase_sector_alignment: __virtio32, |
| 122 |
pub zoned: virtio_blk_config_virtio_blk_zoned_characteristics, |
| 123 |
} |
| 124 |
#[repr(C)] |
| 125 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 126 |
pub struct virtio_blk_config_virtio_blk_geometry { |
| 127 |
pub cylinders: __virtio16, |
| 128 |
pub heads: __u8, |
| 129 |
pub sectors: __u8, |
| 130 |
} |
| 131 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 132 |
const _: () = { |
| 133 |
["Size of virtio_blk_config_virtio_blk_geometry"] |
| 134 |
[::std::mem::size_of::<virtio_blk_config_virtio_blk_geometry>() - 4usize]; |
| 135 |
["Alignment of virtio_blk_config_virtio_blk_geometry"] |
| 136 |
[::std::mem::align_of::<virtio_blk_config_virtio_blk_geometry>() - 2usize]; |
| 137 |
["Offset of field: virtio_blk_config_virtio_blk_geometry::cylinders"] |
| 138 |
[::std::mem::offset_of!(virtio_blk_config_virtio_blk_geometry, cylinders) - 0usize]; |
| 139 |
["Offset of field: virtio_blk_config_virtio_blk_geometry::heads"] |
| 140 |
[::std::mem::offset_of!(virtio_blk_config_virtio_blk_geometry, heads) - 2usize]; |
| 141 |
["Offset of field: virtio_blk_config_virtio_blk_geometry::sectors"] |
| 142 |
[::std::mem::offset_of!(virtio_blk_config_virtio_blk_geometry, sectors) - 3usize]; |
| 143 |
}; |
| 144 |
#[repr(C)] |
| 145 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 146 |
pub struct virtio_blk_config_virtio_blk_zoned_characteristics { |
| 147 |
pub zone_sectors: __virtio32, |
| 148 |
pub max_open_zones: __virtio32, |
| 149 |
pub max_active_zones: __virtio32, |
| 150 |
pub max_append_sectors: __virtio32, |
| 151 |
pub write_granularity: __virtio32, |
| 152 |
pub model: __u8, |
| 153 |
pub unused2: [__u8; 3usize], |
| 154 |
} |
| 155 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 156 |
const _: () = { |
| 157 |
["Size of virtio_blk_config_virtio_blk_zoned_characteristics"] |
| 158 |
[::std::mem::size_of::<virtio_blk_config_virtio_blk_zoned_characteristics>() - 24usize]; |
| 159 |
["Alignment of virtio_blk_config_virtio_blk_zoned_characteristics"] |
| 160 |
[::std::mem::align_of::<virtio_blk_config_virtio_blk_zoned_characteristics>() - 4usize]; |
| 161 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::zone_sectors"][::std::mem::offset_of!( |
| 162 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 163 |
zone_sectors |
| 164 |
) |
| 165 |
- 0usize]; |
| 166 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::max_open_zones"][::std::mem::offset_of!( |
| 167 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 168 |
max_open_zones |
| 169 |
) |
| 170 |
- 4usize]; |
| 171 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::max_active_zones"][::std::mem::offset_of!( |
| 172 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 173 |
max_active_zones |
| 174 |
) |
| 175 |
- 8usize]; |
| 176 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::max_append_sectors"][::std::mem::offset_of!( |
| 177 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 178 |
max_append_sectors |
| 179 |
) |
| 180 |
- 12usize]; |
| 181 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::write_granularity"][::std::mem::offset_of!( |
| 182 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 183 |
write_granularity |
| 184 |
) |
| 185 |
- 16usize]; |
| 186 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::model"][::std::mem::offset_of!( |
| 187 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 188 |
model |
| 189 |
) - 20usize]; |
| 190 |
["Offset of field: virtio_blk_config_virtio_blk_zoned_characteristics::unused2"][::std::mem::offset_of!( |
| 191 |
virtio_blk_config_virtio_blk_zoned_characteristics, |
| 192 |
unused2 |
| 193 |
) - 21usize]; |
| 194 |
}; |
| 195 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 196 |
const _: () = { |
| 197 |
["Size of virtio_blk_config"][::std::mem::size_of::<virtio_blk_config>() - 96usize]; |
| 198 |
["Alignment of virtio_blk_config"][::std::mem::align_of::<virtio_blk_config>() - 1usize]; |
| 199 |
["Offset of field: virtio_blk_config::capacity"] |
| 200 |
[::std::mem::offset_of!(virtio_blk_config, capacity) - 0usize]; |
| 201 |
["Offset of field: virtio_blk_config::size_max"] |
| 202 |
[::std::mem::offset_of!(virtio_blk_config, size_max) - 8usize]; |
| 203 |
["Offset of field: virtio_blk_config::seg_max"] |
| 204 |
[::std::mem::offset_of!(virtio_blk_config, seg_max) - 12usize]; |
| 205 |
["Offset of field: virtio_blk_config::geometry"] |
| 206 |
[::std::mem::offset_of!(virtio_blk_config, geometry) - 16usize]; |
| 207 |
["Offset of field: virtio_blk_config::blk_size"] |
| 208 |
[::std::mem::offset_of!(virtio_blk_config, blk_size) - 20usize]; |
| 209 |
["Offset of field: virtio_blk_config::physical_block_exp"] |
| 210 |
[::std::mem::offset_of!(virtio_blk_config, physical_block_exp) - 24usize]; |
| 211 |
["Offset of field: virtio_blk_config::alignment_offset"] |
| 212 |
[::std::mem::offset_of!(virtio_blk_config, alignment_offset) - 25usize]; |
| 213 |
["Offset of field: virtio_blk_config::min_io_size"] |
| 214 |
[::std::mem::offset_of!(virtio_blk_config, min_io_size) - 26usize]; |
| 215 |
["Offset of field: virtio_blk_config::opt_io_size"] |
| 216 |
[::std::mem::offset_of!(virtio_blk_config, opt_io_size) - 28usize]; |
| 217 |
["Offset of field: virtio_blk_config::wce"] |
| 218 |
[::std::mem::offset_of!(virtio_blk_config, wce) - 32usize]; |
| 219 |
["Offset of field: virtio_blk_config::unused"] |
| 220 |
[::std::mem::offset_of!(virtio_blk_config, unused) - 33usize]; |
| 221 |
["Offset of field: virtio_blk_config::num_queues"] |
| 222 |
[::std::mem::offset_of!(virtio_blk_config, num_queues) - 34usize]; |
| 223 |
["Offset of field: virtio_blk_config::max_discard_sectors"] |
| 224 |
[::std::mem::offset_of!(virtio_blk_config, max_discard_sectors) - 36usize]; |
| 225 |
["Offset of field: virtio_blk_config::max_discard_seg"] |
| 226 |
[::std::mem::offset_of!(virtio_blk_config, max_discard_seg) - 40usize]; |
| 227 |
["Offset of field: virtio_blk_config::discard_sector_alignment"] |
| 228 |
[::std::mem::offset_of!(virtio_blk_config, discard_sector_alignment) - 44usize]; |
| 229 |
["Offset of field: virtio_blk_config::max_write_zeroes_sectors"] |
| 230 |
[::std::mem::offset_of!(virtio_blk_config, max_write_zeroes_sectors) - 48usize]; |
| 231 |
["Offset of field: virtio_blk_config::max_write_zeroes_seg"] |
| 232 |
[::std::mem::offset_of!(virtio_blk_config, max_write_zeroes_seg) - 52usize]; |
| 233 |
["Offset of field: virtio_blk_config::write_zeroes_may_unmap"] |
| 234 |
[::std::mem::offset_of!(virtio_blk_config, write_zeroes_may_unmap) - 56usize]; |
| 235 |
["Offset of field: virtio_blk_config::unused1"] |
| 236 |
[::std::mem::offset_of!(virtio_blk_config, unused1) - 57usize]; |
| 237 |
["Offset of field: virtio_blk_config::max_secure_erase_sectors"] |
| 238 |
[::std::mem::offset_of!(virtio_blk_config, max_secure_erase_sectors) - 60usize]; |
| 239 |
["Offset of field: virtio_blk_config::max_secure_erase_seg"] |
| 240 |
[::std::mem::offset_of!(virtio_blk_config, max_secure_erase_seg) - 64usize]; |
| 241 |
["Offset of field: virtio_blk_config::secure_erase_sector_alignment"] |
| 242 |
[::std::mem::offset_of!(virtio_blk_config, secure_erase_sector_alignment) - 68usize]; |
| 243 |
["Offset of field: virtio_blk_config::zoned"] |
| 244 |
[::std::mem::offset_of!(virtio_blk_config, zoned) - 72usize]; |
| 245 |
}; |
| 246 |
#[repr(C)] |
| 247 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 248 |
pub struct virtio_blk_outhdr { |
| 249 |
pub type_: __virtio32, |
| 250 |
pub ioprio: __virtio32, |
| 251 |
pub sector: __virtio64, |
| 252 |
} |
| 253 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 254 |
const _: () = { |
| 255 |
["Size of virtio_blk_outhdr"][::std::mem::size_of::<virtio_blk_outhdr>() - 16usize]; |
| 256 |
["Alignment of virtio_blk_outhdr"][::std::mem::align_of::<virtio_blk_outhdr>() - 8usize]; |
| 257 |
["Offset of field: virtio_blk_outhdr::type_"] |
| 258 |
[::std::mem::offset_of!(virtio_blk_outhdr, type_) - 0usize]; |
| 259 |
["Offset of field: virtio_blk_outhdr::ioprio"] |
| 260 |
[::std::mem::offset_of!(virtio_blk_outhdr, ioprio) - 4usize]; |
| 261 |
["Offset of field: virtio_blk_outhdr::sector"] |
| 262 |
[::std::mem::offset_of!(virtio_blk_outhdr, sector) - 8usize]; |
| 263 |
}; |
| 264 |
#[repr(C)] |
| 265 |
#[derive(Debug, Copy, Clone, PartialEq)] |
| 266 |
pub struct virtio_blk_zone_descriptor { |
| 267 |
pub z_cap: __virtio64, |
| 268 |
pub z_start: __virtio64, |
| 269 |
pub z_wp: __virtio64, |
| 270 |
pub z_type: __u8, |
| 271 |
pub z_state: __u8, |
| 272 |
pub reserved: [__u8; 38usize], |
| 273 |
} |
| 274 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 275 |
const _: () = { |
| 276 |
["Size of virtio_blk_zone_descriptor"] |
| 277 |
[::std::mem::size_of::<virtio_blk_zone_descriptor>() - 64usize]; |
| 278 |
["Alignment of virtio_blk_zone_descriptor"] |
| 279 |
[::std::mem::align_of::<virtio_blk_zone_descriptor>() - 8usize]; |
| 280 |
["Offset of field: virtio_blk_zone_descriptor::z_cap"] |
| 281 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, z_cap) - 0usize]; |
| 282 |
["Offset of field: virtio_blk_zone_descriptor::z_start"] |
| 283 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, z_start) - 8usize]; |
| 284 |
["Offset of field: virtio_blk_zone_descriptor::z_wp"] |
| 285 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, z_wp) - 16usize]; |
| 286 |
["Offset of field: virtio_blk_zone_descriptor::z_type"] |
| 287 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, z_type) - 24usize]; |
| 288 |
["Offset of field: virtio_blk_zone_descriptor::z_state"] |
| 289 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, z_state) - 25usize]; |
| 290 |
["Offset of field: virtio_blk_zone_descriptor::reserved"] |
| 291 |
[::std::mem::offset_of!(virtio_blk_zone_descriptor, reserved) - 26usize]; |
| 292 |
}; |
| 293 |
impl Default for virtio_blk_zone_descriptor { |
| 294 |
fn default() -> Self { |
| 295 |
let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); |
| 296 |
unsafe { |
| 297 |
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); |
| 298 |
s.assume_init() |
| 299 |
} |
| 300 |
} |
| 301 |
} |
| 302 |
#[repr(C)] |
| 303 |
#[derive(Debug)] |
| 304 |
pub struct virtio_blk_zone_report { |
| 305 |
pub nr_zones: __virtio64, |
| 306 |
pub reserved: [__u8; 56usize], |
| 307 |
pub zones: __IncompleteArrayField<virtio_blk_zone_descriptor>, |
| 308 |
} |
| 309 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 310 |
const _: () = { |
| 311 |
["Size of virtio_blk_zone_report"][::std::mem::size_of::<virtio_blk_zone_report>() - 64usize]; |
| 312 |
["Alignment of virtio_blk_zone_report"] |
| 313 |
[::std::mem::align_of::<virtio_blk_zone_report>() - 8usize]; |
| 314 |
["Offset of field: virtio_blk_zone_report::nr_zones"] |
| 315 |
[::std::mem::offset_of!(virtio_blk_zone_report, nr_zones) - 0usize]; |
| 316 |
["Offset of field: virtio_blk_zone_report::reserved"] |
| 317 |
[::std::mem::offset_of!(virtio_blk_zone_report, reserved) - 8usize]; |
| 318 |
["Offset of field: virtio_blk_zone_report::zones"] |
| 319 |
[::std::mem::offset_of!(virtio_blk_zone_report, zones) - 64usize]; |
| 320 |
}; |
| 321 |
impl Default for virtio_blk_zone_report { |
| 322 |
fn default() -> Self { |
| 323 |
let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); |
| 324 |
unsafe { |
| 325 |
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); |
| 326 |
s.assume_init() |
| 327 |
} |
| 328 |
} |
| 329 |
} |
| 330 |
#[repr(C)] |
| 331 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 332 |
pub struct virtio_blk_discard_write_zeroes { |
| 333 |
pub sector: __le64, |
| 334 |
pub num_sectors: __le32, |
| 335 |
pub flags: __le32, |
| 336 |
} |
| 337 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 338 |
const _: () = { |
| 339 |
["Size of virtio_blk_discard_write_zeroes"] |
| 340 |
[::std::mem::size_of::<virtio_blk_discard_write_zeroes>() - 16usize]; |
| 341 |
["Alignment of virtio_blk_discard_write_zeroes"] |
| 342 |
[::std::mem::align_of::<virtio_blk_discard_write_zeroes>() - 8usize]; |
| 343 |
["Offset of field: virtio_blk_discard_write_zeroes::sector"] |
| 344 |
[::std::mem::offset_of!(virtio_blk_discard_write_zeroes, sector) - 0usize]; |
| 345 |
["Offset of field: virtio_blk_discard_write_zeroes::num_sectors"] |
| 346 |
[::std::mem::offset_of!(virtio_blk_discard_write_zeroes, num_sectors) - 8usize]; |
| 347 |
["Offset of field: virtio_blk_discard_write_zeroes::flags"] |
| 348 |
[::std::mem::offset_of!(virtio_blk_discard_write_zeroes, flags) - 12usize]; |
| 349 |
}; |
| 350 |
#[repr(C)] |
| 351 |
#[derive(Debug, Default, Copy, Clone, PartialEq)] |
| 352 |
pub struct virtio_scsi_inhdr { |
| 353 |
pub errors: __virtio32, |
| 354 |
pub data_len: __virtio32, |
| 355 |
pub sense_len: __virtio32, |
| 356 |
pub residual: __virtio32, |
| 357 |
} |
| 358 |
#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 359 |
const _: () = { |
| 360 |
["Size of virtio_scsi_inhdr"][::std::mem::size_of::<virtio_scsi_inhdr>() - 16usize]; |
| 361 |
["Alignment of virtio_scsi_inhdr"][::std::mem::align_of::<virtio_scsi_inhdr>() - 4usize]; |
| 362 |
["Offset of field: virtio_scsi_inhdr::errors"] |
| 363 |
[::std::mem::offset_of!(virtio_scsi_inhdr, errors) - 0usize]; |
| 364 |
["Offset of field: virtio_scsi_inhdr::data_len"] |
| 365 |
[::std::mem::offset_of!(virtio_scsi_inhdr, data_len) - 4usize]; |
| 366 |
["Offset of field: virtio_scsi_inhdr::sense_len"] |
| 367 |
[::std::mem::offset_of!(virtio_scsi_inhdr, sense_len) - 8usize]; |
| 368 |
["Offset of field: virtio_scsi_inhdr::residual"] |
| 369 |
[::std::mem::offset_of!(virtio_scsi_inhdr, residual) - 12usize]; |
| 370 |
}; |