1 /* automatically generated by rust-bindgen 0.63.0 */
2
3 pub const VIRTIO_SCSI_CDB_DEFAULT_SIZE: u32 = 32;
4 pub const VIRTIO_SCSI_SENSE_DEFAULT_SIZE: u32 = 96;
5 pub const VIRTIO_SCSI_CDB_SIZE: u32 = 32;
6 pub const VIRTIO_SCSI_SENSE_SIZE: u32 = 96;
7 pub const VIRTIO_SCSI_F_INOUT: u32 = 0;
8 pub const VIRTIO_SCSI_F_HOTPLUG: u32 = 1;
9 pub const VIRTIO_SCSI_F_CHANGE: u32 = 2;
10 pub const VIRTIO_SCSI_F_T10_PI: u32 = 3;
11 pub const VIRTIO_SCSI_S_OK: u32 = 0;
12 pub const VIRTIO_SCSI_S_OVERRUN: u32 = 1;
13 pub const VIRTIO_SCSI_S_ABORTED: u32 = 2;
14 pub const VIRTIO_SCSI_S_BAD_TARGET: u32 = 3;
15 pub const VIRTIO_SCSI_S_RESET: u32 = 4;
16 pub const VIRTIO_SCSI_S_BUSY: u32 = 5;
17 pub const VIRTIO_SCSI_S_TRANSPORT_FAILURE: u32 = 6;
18 pub const VIRTIO_SCSI_S_TARGET_FAILURE: u32 = 7;
19 pub const VIRTIO_SCSI_S_NEXUS_FAILURE: u32 = 8;
20 pub const VIRTIO_SCSI_S_FAILURE: u32 = 9;
21 pub const VIRTIO_SCSI_S_FUNCTION_SUCCEEDED: u32 = 10;
22 pub const VIRTIO_SCSI_S_FUNCTION_REJECTED: u32 = 11;
23 pub const VIRTIO_SCSI_S_INCORRECT_LUN: u32 = 12;
24 pub const VIRTIO_SCSI_T_TMF: u32 = 0;
25 pub const VIRTIO_SCSI_T_AN_QUERY: u32 = 1;
26 pub const VIRTIO_SCSI_T_AN_SUBSCRIBE: u32 = 2;
27 pub const VIRTIO_SCSI_T_TMF_ABORT_TASK: u32 = 0;
28 pub const VIRTIO_SCSI_T_TMF_ABORT_TASK_SET: u32 = 1;
29 pub const VIRTIO_SCSI_T_TMF_CLEAR_ACA: u32 = 2;
30 pub const VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET: u32 = 3;
31 pub const VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET: u32 = 4;
32 pub const VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET: u32 = 5;
33 pub const VIRTIO_SCSI_T_TMF_QUERY_TASK: u32 = 6;
34 pub const VIRTIO_SCSI_T_TMF_QUERY_TASK_SET: u32 = 7;
35 pub const VIRTIO_SCSI_T_EVENTS_MISSED: u32 = 2147483648;
36 pub const VIRTIO_SCSI_T_NO_EVENT: u32 = 0;
37 pub const VIRTIO_SCSI_T_TRANSPORT_RESET: u32 = 1;
38 pub const VIRTIO_SCSI_T_ASYNC_NOTIFY: u32 = 2;
39 pub const VIRTIO_SCSI_T_PARAM_CHANGE: u32 = 3;
40 pub const VIRTIO_SCSI_EVT_RESET_HARD: u32 = 0;
41 pub const VIRTIO_SCSI_EVT_RESET_RESCAN: u32 = 1;
42 pub const VIRTIO_SCSI_EVT_RESET_REMOVED: u32 = 2;
43 pub const VIRTIO_SCSI_S_SIMPLE: u32 = 0;
44 pub const VIRTIO_SCSI_S_ORDERED: u32 = 1;
45 pub const VIRTIO_SCSI_S_HEAD: u32 = 2;
46 pub const VIRTIO_SCSI_S_ACA: u32 = 3;
47 pub type __u8 = ::std::os::raw::c_uchar;
48 pub type __u16 = ::std::os::raw::c_ushort;
49 pub type __u32 = ::std::os::raw::c_uint;
50 pub type __u64 = ::std::os::raw::c_ulonglong;
51 pub type __virtio16 = __u16;
52 pub type __virtio32 = __u32;
53 pub type __virtio64 = __u64;
54 #[repr(C, packed)]
55 #[derive(Debug, Default, Copy, Clone, PartialEq)]
56 pub struct virtio_scsi_cmd_req {
57 pub lun: [__u8; 8usize],
58 pub tag: __virtio64,
59 pub task_attr: __u8,
60 pub prio: __u8,
61 pub crn: __u8,
62 pub cdb: [__u8; 32usize],
63 }
64 #[test]
bindgen_test_layout_virtio_scsi_cmd_req()65 fn bindgen_test_layout_virtio_scsi_cmd_req() {
66 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_cmd_req> = ::std::mem::MaybeUninit::uninit();
67 let ptr = UNINIT.as_ptr();
68 assert_eq!(
69 ::std::mem::size_of::<virtio_scsi_cmd_req>(),
70 51usize,
71 concat!("Size of: ", stringify!(virtio_scsi_cmd_req))
72 );
73 assert_eq!(
74 ::std::mem::align_of::<virtio_scsi_cmd_req>(),
75 1usize,
76 concat!("Alignment of ", stringify!(virtio_scsi_cmd_req))
77 );
78 assert_eq!(
79 unsafe { ::std::ptr::addr_of!((*ptr).lun) as usize - ptr as usize },
80 0usize,
81 concat!(
82 "Offset of field: ",
83 stringify!(virtio_scsi_cmd_req),
84 "::",
85 stringify!(lun)
86 )
87 );
88 assert_eq!(
89 unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
90 8usize,
91 concat!(
92 "Offset of field: ",
93 stringify!(virtio_scsi_cmd_req),
94 "::",
95 stringify!(tag)
96 )
97 );
98 assert_eq!(
99 unsafe { ::std::ptr::addr_of!((*ptr).task_attr) as usize - ptr as usize },
100 16usize,
101 concat!(
102 "Offset of field: ",
103 stringify!(virtio_scsi_cmd_req),
104 "::",
105 stringify!(task_attr)
106 )
107 );
108 assert_eq!(
109 unsafe { ::std::ptr::addr_of!((*ptr).prio) as usize - ptr as usize },
110 17usize,
111 concat!(
112 "Offset of field: ",
113 stringify!(virtio_scsi_cmd_req),
114 "::",
115 stringify!(prio)
116 )
117 );
118 assert_eq!(
119 unsafe { ::std::ptr::addr_of!((*ptr).crn) as usize - ptr as usize },
120 18usize,
121 concat!(
122 "Offset of field: ",
123 stringify!(virtio_scsi_cmd_req),
124 "::",
125 stringify!(crn)
126 )
127 );
128 assert_eq!(
129 unsafe { ::std::ptr::addr_of!((*ptr).cdb) as usize - ptr as usize },
130 19usize,
131 concat!(
132 "Offset of field: ",
133 stringify!(virtio_scsi_cmd_req),
134 "::",
135 stringify!(cdb)
136 )
137 );
138 }
139 #[repr(C, packed)]
140 #[derive(Debug, Default, Copy, Clone, PartialEq)]
141 pub struct virtio_scsi_cmd_req_pi {
142 pub lun: [__u8; 8usize],
143 pub tag: __virtio64,
144 pub task_attr: __u8,
145 pub prio: __u8,
146 pub crn: __u8,
147 pub pi_bytesout: __virtio32,
148 pub pi_bytesin: __virtio32,
149 pub cdb: [__u8; 32usize],
150 }
151 #[test]
bindgen_test_layout_virtio_scsi_cmd_req_pi()152 fn bindgen_test_layout_virtio_scsi_cmd_req_pi() {
153 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_cmd_req_pi> =
154 ::std::mem::MaybeUninit::uninit();
155 let ptr = UNINIT.as_ptr();
156 assert_eq!(
157 ::std::mem::size_of::<virtio_scsi_cmd_req_pi>(),
158 59usize,
159 concat!("Size of: ", stringify!(virtio_scsi_cmd_req_pi))
160 );
161 assert_eq!(
162 ::std::mem::align_of::<virtio_scsi_cmd_req_pi>(),
163 1usize,
164 concat!("Alignment of ", stringify!(virtio_scsi_cmd_req_pi))
165 );
166 assert_eq!(
167 unsafe { ::std::ptr::addr_of!((*ptr).lun) as usize - ptr as usize },
168 0usize,
169 concat!(
170 "Offset of field: ",
171 stringify!(virtio_scsi_cmd_req_pi),
172 "::",
173 stringify!(lun)
174 )
175 );
176 assert_eq!(
177 unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
178 8usize,
179 concat!(
180 "Offset of field: ",
181 stringify!(virtio_scsi_cmd_req_pi),
182 "::",
183 stringify!(tag)
184 )
185 );
186 assert_eq!(
187 unsafe { ::std::ptr::addr_of!((*ptr).task_attr) as usize - ptr as usize },
188 16usize,
189 concat!(
190 "Offset of field: ",
191 stringify!(virtio_scsi_cmd_req_pi),
192 "::",
193 stringify!(task_attr)
194 )
195 );
196 assert_eq!(
197 unsafe { ::std::ptr::addr_of!((*ptr).prio) as usize - ptr as usize },
198 17usize,
199 concat!(
200 "Offset of field: ",
201 stringify!(virtio_scsi_cmd_req_pi),
202 "::",
203 stringify!(prio)
204 )
205 );
206 assert_eq!(
207 unsafe { ::std::ptr::addr_of!((*ptr).crn) as usize - ptr as usize },
208 18usize,
209 concat!(
210 "Offset of field: ",
211 stringify!(virtio_scsi_cmd_req_pi),
212 "::",
213 stringify!(crn)
214 )
215 );
216 assert_eq!(
217 unsafe { ::std::ptr::addr_of!((*ptr).pi_bytesout) as usize - ptr as usize },
218 19usize,
219 concat!(
220 "Offset of field: ",
221 stringify!(virtio_scsi_cmd_req_pi),
222 "::",
223 stringify!(pi_bytesout)
224 )
225 );
226 assert_eq!(
227 unsafe { ::std::ptr::addr_of!((*ptr).pi_bytesin) as usize - ptr as usize },
228 23usize,
229 concat!(
230 "Offset of field: ",
231 stringify!(virtio_scsi_cmd_req_pi),
232 "::",
233 stringify!(pi_bytesin)
234 )
235 );
236 assert_eq!(
237 unsafe { ::std::ptr::addr_of!((*ptr).cdb) as usize - ptr as usize },
238 27usize,
239 concat!(
240 "Offset of field: ",
241 stringify!(virtio_scsi_cmd_req_pi),
242 "::",
243 stringify!(cdb)
244 )
245 );
246 }
247 #[repr(C, packed)]
248 #[derive(Debug, Copy, Clone, PartialEq)]
249 pub struct virtio_scsi_cmd_resp {
250 pub sense_len: __virtio32,
251 pub resid: __virtio32,
252 pub status_qualifier: __virtio16,
253 pub status: __u8,
254 pub response: __u8,
255 pub sense: [__u8; 96usize],
256 }
257 #[test]
bindgen_test_layout_virtio_scsi_cmd_resp()258 fn bindgen_test_layout_virtio_scsi_cmd_resp() {
259 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_cmd_resp> = ::std::mem::MaybeUninit::uninit();
260 let ptr = UNINIT.as_ptr();
261 assert_eq!(
262 ::std::mem::size_of::<virtio_scsi_cmd_resp>(),
263 108usize,
264 concat!("Size of: ", stringify!(virtio_scsi_cmd_resp))
265 );
266 assert_eq!(
267 ::std::mem::align_of::<virtio_scsi_cmd_resp>(),
268 1usize,
269 concat!("Alignment of ", stringify!(virtio_scsi_cmd_resp))
270 );
271 assert_eq!(
272 unsafe { ::std::ptr::addr_of!((*ptr).sense_len) as usize - ptr as usize },
273 0usize,
274 concat!(
275 "Offset of field: ",
276 stringify!(virtio_scsi_cmd_resp),
277 "::",
278 stringify!(sense_len)
279 )
280 );
281 assert_eq!(
282 unsafe { ::std::ptr::addr_of!((*ptr).resid) as usize - ptr as usize },
283 4usize,
284 concat!(
285 "Offset of field: ",
286 stringify!(virtio_scsi_cmd_resp),
287 "::",
288 stringify!(resid)
289 )
290 );
291 assert_eq!(
292 unsafe { ::std::ptr::addr_of!((*ptr).status_qualifier) as usize - ptr as usize },
293 8usize,
294 concat!(
295 "Offset of field: ",
296 stringify!(virtio_scsi_cmd_resp),
297 "::",
298 stringify!(status_qualifier)
299 )
300 );
301 assert_eq!(
302 unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize },
303 10usize,
304 concat!(
305 "Offset of field: ",
306 stringify!(virtio_scsi_cmd_resp),
307 "::",
308 stringify!(status)
309 )
310 );
311 assert_eq!(
312 unsafe { ::std::ptr::addr_of!((*ptr).response) as usize - ptr as usize },
313 11usize,
314 concat!(
315 "Offset of field: ",
316 stringify!(virtio_scsi_cmd_resp),
317 "::",
318 stringify!(response)
319 )
320 );
321 assert_eq!(
322 unsafe { ::std::ptr::addr_of!((*ptr).sense) as usize - ptr as usize },
323 12usize,
324 concat!(
325 "Offset of field: ",
326 stringify!(virtio_scsi_cmd_resp),
327 "::",
328 stringify!(sense)
329 )
330 );
331 }
332 impl Default for virtio_scsi_cmd_resp {
default() -> Self333 fn default() -> Self {
334 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
335 unsafe {
336 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
337 s.assume_init()
338 }
339 }
340 }
341 #[repr(C, packed)]
342 #[derive(Debug, Default, Copy, Clone, PartialEq)]
343 pub struct virtio_scsi_ctrl_tmf_req {
344 pub type_: __virtio32,
345 pub subtype: __virtio32,
346 pub lun: [__u8; 8usize],
347 pub tag: __virtio64,
348 }
349 #[test]
bindgen_test_layout_virtio_scsi_ctrl_tmf_req()350 fn bindgen_test_layout_virtio_scsi_ctrl_tmf_req() {
351 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_ctrl_tmf_req> =
352 ::std::mem::MaybeUninit::uninit();
353 let ptr = UNINIT.as_ptr();
354 assert_eq!(
355 ::std::mem::size_of::<virtio_scsi_ctrl_tmf_req>(),
356 24usize,
357 concat!("Size of: ", stringify!(virtio_scsi_ctrl_tmf_req))
358 );
359 assert_eq!(
360 ::std::mem::align_of::<virtio_scsi_ctrl_tmf_req>(),
361 1usize,
362 concat!("Alignment of ", stringify!(virtio_scsi_ctrl_tmf_req))
363 );
364 assert_eq!(
365 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
366 0usize,
367 concat!(
368 "Offset of field: ",
369 stringify!(virtio_scsi_ctrl_tmf_req),
370 "::",
371 stringify!(type_)
372 )
373 );
374 assert_eq!(
375 unsafe { ::std::ptr::addr_of!((*ptr).subtype) as usize - ptr as usize },
376 4usize,
377 concat!(
378 "Offset of field: ",
379 stringify!(virtio_scsi_ctrl_tmf_req),
380 "::",
381 stringify!(subtype)
382 )
383 );
384 assert_eq!(
385 unsafe { ::std::ptr::addr_of!((*ptr).lun) as usize - ptr as usize },
386 8usize,
387 concat!(
388 "Offset of field: ",
389 stringify!(virtio_scsi_ctrl_tmf_req),
390 "::",
391 stringify!(lun)
392 )
393 );
394 assert_eq!(
395 unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
396 16usize,
397 concat!(
398 "Offset of field: ",
399 stringify!(virtio_scsi_ctrl_tmf_req),
400 "::",
401 stringify!(tag)
402 )
403 );
404 }
405 #[repr(C, packed)]
406 #[derive(Debug, Default, Copy, Clone, PartialEq)]
407 pub struct virtio_scsi_ctrl_tmf_resp {
408 pub response: __u8,
409 }
410 #[test]
bindgen_test_layout_virtio_scsi_ctrl_tmf_resp()411 fn bindgen_test_layout_virtio_scsi_ctrl_tmf_resp() {
412 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_ctrl_tmf_resp> =
413 ::std::mem::MaybeUninit::uninit();
414 let ptr = UNINIT.as_ptr();
415 assert_eq!(
416 ::std::mem::size_of::<virtio_scsi_ctrl_tmf_resp>(),
417 1usize,
418 concat!("Size of: ", stringify!(virtio_scsi_ctrl_tmf_resp))
419 );
420 assert_eq!(
421 ::std::mem::align_of::<virtio_scsi_ctrl_tmf_resp>(),
422 1usize,
423 concat!("Alignment of ", stringify!(virtio_scsi_ctrl_tmf_resp))
424 );
425 assert_eq!(
426 unsafe { ::std::ptr::addr_of!((*ptr).response) as usize - ptr as usize },
427 0usize,
428 concat!(
429 "Offset of field: ",
430 stringify!(virtio_scsi_ctrl_tmf_resp),
431 "::",
432 stringify!(response)
433 )
434 );
435 }
436 #[repr(C, packed)]
437 #[derive(Debug, Default, Copy, Clone, PartialEq)]
438 pub struct virtio_scsi_ctrl_an_req {
439 pub type_: __virtio32,
440 pub lun: [__u8; 8usize],
441 pub event_requested: __virtio32,
442 }
443 #[test]
bindgen_test_layout_virtio_scsi_ctrl_an_req()444 fn bindgen_test_layout_virtio_scsi_ctrl_an_req() {
445 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_ctrl_an_req> =
446 ::std::mem::MaybeUninit::uninit();
447 let ptr = UNINIT.as_ptr();
448 assert_eq!(
449 ::std::mem::size_of::<virtio_scsi_ctrl_an_req>(),
450 16usize,
451 concat!("Size of: ", stringify!(virtio_scsi_ctrl_an_req))
452 );
453 assert_eq!(
454 ::std::mem::align_of::<virtio_scsi_ctrl_an_req>(),
455 1usize,
456 concat!("Alignment of ", stringify!(virtio_scsi_ctrl_an_req))
457 );
458 assert_eq!(
459 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
460 0usize,
461 concat!(
462 "Offset of field: ",
463 stringify!(virtio_scsi_ctrl_an_req),
464 "::",
465 stringify!(type_)
466 )
467 );
468 assert_eq!(
469 unsafe { ::std::ptr::addr_of!((*ptr).lun) as usize - ptr as usize },
470 4usize,
471 concat!(
472 "Offset of field: ",
473 stringify!(virtio_scsi_ctrl_an_req),
474 "::",
475 stringify!(lun)
476 )
477 );
478 assert_eq!(
479 unsafe { ::std::ptr::addr_of!((*ptr).event_requested) as usize - ptr as usize },
480 12usize,
481 concat!(
482 "Offset of field: ",
483 stringify!(virtio_scsi_ctrl_an_req),
484 "::",
485 stringify!(event_requested)
486 )
487 );
488 }
489 #[repr(C, packed)]
490 #[derive(Debug, Default, Copy, Clone, PartialEq)]
491 pub struct virtio_scsi_ctrl_an_resp {
492 pub event_actual: __virtio32,
493 pub response: __u8,
494 }
495 #[test]
bindgen_test_layout_virtio_scsi_ctrl_an_resp()496 fn bindgen_test_layout_virtio_scsi_ctrl_an_resp() {
497 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_ctrl_an_resp> =
498 ::std::mem::MaybeUninit::uninit();
499 let ptr = UNINIT.as_ptr();
500 assert_eq!(
501 ::std::mem::size_of::<virtio_scsi_ctrl_an_resp>(),
502 5usize,
503 concat!("Size of: ", stringify!(virtio_scsi_ctrl_an_resp))
504 );
505 assert_eq!(
506 ::std::mem::align_of::<virtio_scsi_ctrl_an_resp>(),
507 1usize,
508 concat!("Alignment of ", stringify!(virtio_scsi_ctrl_an_resp))
509 );
510 assert_eq!(
511 unsafe { ::std::ptr::addr_of!((*ptr).event_actual) as usize - ptr as usize },
512 0usize,
513 concat!(
514 "Offset of field: ",
515 stringify!(virtio_scsi_ctrl_an_resp),
516 "::",
517 stringify!(event_actual)
518 )
519 );
520 assert_eq!(
521 unsafe { ::std::ptr::addr_of!((*ptr).response) as usize - ptr as usize },
522 4usize,
523 concat!(
524 "Offset of field: ",
525 stringify!(virtio_scsi_ctrl_an_resp),
526 "::",
527 stringify!(response)
528 )
529 );
530 }
531 #[repr(C, packed)]
532 #[derive(Debug, Default, Copy, Clone, PartialEq)]
533 pub struct virtio_scsi_event {
534 pub event: __virtio32,
535 pub lun: [__u8; 8usize],
536 pub reason: __virtio32,
537 }
538 #[test]
bindgen_test_layout_virtio_scsi_event()539 fn bindgen_test_layout_virtio_scsi_event() {
540 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_event> = ::std::mem::MaybeUninit::uninit();
541 let ptr = UNINIT.as_ptr();
542 assert_eq!(
543 ::std::mem::size_of::<virtio_scsi_event>(),
544 16usize,
545 concat!("Size of: ", stringify!(virtio_scsi_event))
546 );
547 assert_eq!(
548 ::std::mem::align_of::<virtio_scsi_event>(),
549 1usize,
550 concat!("Alignment of ", stringify!(virtio_scsi_event))
551 );
552 assert_eq!(
553 unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize },
554 0usize,
555 concat!(
556 "Offset of field: ",
557 stringify!(virtio_scsi_event),
558 "::",
559 stringify!(event)
560 )
561 );
562 assert_eq!(
563 unsafe { ::std::ptr::addr_of!((*ptr).lun) as usize - ptr as usize },
564 4usize,
565 concat!(
566 "Offset of field: ",
567 stringify!(virtio_scsi_event),
568 "::",
569 stringify!(lun)
570 )
571 );
572 assert_eq!(
573 unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize },
574 12usize,
575 concat!(
576 "Offset of field: ",
577 stringify!(virtio_scsi_event),
578 "::",
579 stringify!(reason)
580 )
581 );
582 }
583 #[repr(C, packed)]
584 #[derive(Debug, Default, Copy, Clone, PartialEq)]
585 pub struct virtio_scsi_config {
586 pub num_queues: __virtio32,
587 pub seg_max: __virtio32,
588 pub max_sectors: __virtio32,
589 pub cmd_per_lun: __virtio32,
590 pub event_info_size: __virtio32,
591 pub sense_size: __virtio32,
592 pub cdb_size: __virtio32,
593 pub max_channel: __virtio16,
594 pub max_target: __virtio16,
595 pub max_lun: __virtio32,
596 }
597 #[test]
bindgen_test_layout_virtio_scsi_config()598 fn bindgen_test_layout_virtio_scsi_config() {
599 const UNINIT: ::std::mem::MaybeUninit<virtio_scsi_config> = ::std::mem::MaybeUninit::uninit();
600 let ptr = UNINIT.as_ptr();
601 assert_eq!(
602 ::std::mem::size_of::<virtio_scsi_config>(),
603 36usize,
604 concat!("Size of: ", stringify!(virtio_scsi_config))
605 );
606 assert_eq!(
607 ::std::mem::align_of::<virtio_scsi_config>(),
608 1usize,
609 concat!("Alignment of ", stringify!(virtio_scsi_config))
610 );
611 assert_eq!(
612 unsafe { ::std::ptr::addr_of!((*ptr).num_queues) as usize - ptr as usize },
613 0usize,
614 concat!(
615 "Offset of field: ",
616 stringify!(virtio_scsi_config),
617 "::",
618 stringify!(num_queues)
619 )
620 );
621 assert_eq!(
622 unsafe { ::std::ptr::addr_of!((*ptr).seg_max) as usize - ptr as usize },
623 4usize,
624 concat!(
625 "Offset of field: ",
626 stringify!(virtio_scsi_config),
627 "::",
628 stringify!(seg_max)
629 )
630 );
631 assert_eq!(
632 unsafe { ::std::ptr::addr_of!((*ptr).max_sectors) as usize - ptr as usize },
633 8usize,
634 concat!(
635 "Offset of field: ",
636 stringify!(virtio_scsi_config),
637 "::",
638 stringify!(max_sectors)
639 )
640 );
641 assert_eq!(
642 unsafe { ::std::ptr::addr_of!((*ptr).cmd_per_lun) as usize - ptr as usize },
643 12usize,
644 concat!(
645 "Offset of field: ",
646 stringify!(virtio_scsi_config),
647 "::",
648 stringify!(cmd_per_lun)
649 )
650 );
651 assert_eq!(
652 unsafe { ::std::ptr::addr_of!((*ptr).event_info_size) as usize - ptr as usize },
653 16usize,
654 concat!(
655 "Offset of field: ",
656 stringify!(virtio_scsi_config),
657 "::",
658 stringify!(event_info_size)
659 )
660 );
661 assert_eq!(
662 unsafe { ::std::ptr::addr_of!((*ptr).sense_size) as usize - ptr as usize },
663 20usize,
664 concat!(
665 "Offset of field: ",
666 stringify!(virtio_scsi_config),
667 "::",
668 stringify!(sense_size)
669 )
670 );
671 assert_eq!(
672 unsafe { ::std::ptr::addr_of!((*ptr).cdb_size) as usize - ptr as usize },
673 24usize,
674 concat!(
675 "Offset of field: ",
676 stringify!(virtio_scsi_config),
677 "::",
678 stringify!(cdb_size)
679 )
680 );
681 assert_eq!(
682 unsafe { ::std::ptr::addr_of!((*ptr).max_channel) as usize - ptr as usize },
683 28usize,
684 concat!(
685 "Offset of field: ",
686 stringify!(virtio_scsi_config),
687 "::",
688 stringify!(max_channel)
689 )
690 );
691 assert_eq!(
692 unsafe { ::std::ptr::addr_of!((*ptr).max_target) as usize - ptr as usize },
693 30usize,
694 concat!(
695 "Offset of field: ",
696 stringify!(virtio_scsi_config),
697 "::",
698 stringify!(max_target)
699 )
700 );
701 assert_eq!(
702 unsafe { ::std::ptr::addr_of!((*ptr).max_lun) as usize - ptr as usize },
703 32usize,
704 concat!(
705 "Offset of field: ",
706 stringify!(virtio_scsi_config),
707 "::",
708 stringify!(max_lun)
709 )
710 );
711 }
712