patches and low-level development discussion
 help / color / mirror / code / Atom feed
fcd5a5d7254232dae13338128a1f7bdf0860c9a2 blob 15044 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
 
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/* automatically generated by rust-bindgen */

pub const __BITS_PER_LONG: u32 = 64;
pub const __FD_SETSIZE: u32 = 1024;
pub const VIRTIO_ID_NET: u32 = 1;
pub const VIRTIO_ID_BLOCK: u32 = 2;
pub const VIRTIO_ID_CONSOLE: u32 = 3;
pub const VIRTIO_ID_RNG: u32 = 4;
pub const VIRTIO_ID_BALLOON: u32 = 5;
pub const VIRTIO_ID_RPMSG: u32 = 7;
pub const VIRTIO_ID_SCSI: u32 = 8;
pub const VIRTIO_ID_9P: u32 = 9;
pub const VIRTIO_ID_RPROC_SERIAL: u32 = 11;
pub const VIRTIO_ID_CAIF: u32 = 12;
pub const VIRTIO_ID_GPU: u32 = 16;
pub const VIRTIO_ID_INPUT: u32 = 18;
pub const VIRTIO_CONFIG_S_ACKNOWLEDGE: u32 = 1;
pub const VIRTIO_CONFIG_S_DRIVER: u32 = 2;
pub const VIRTIO_CONFIG_S_DRIVER_OK: u32 = 4;
pub const VIRTIO_CONFIG_S_FEATURES_OK: u32 = 8;
pub const VIRTIO_CONFIG_S_FAILED: u32 = 128;
pub const VIRTIO_TRANSPORT_F_START: u32 = 28;
pub const VIRTIO_TRANSPORT_F_END: u32 = 33;
pub const VIRTIO_F_NOTIFY_ON_EMPTY: u32 = 24;
pub const VIRTIO_F_ANY_LAYOUT: u32 = 27;
pub const VIRTIO_F_VERSION_1: u32 = 32;
pub const VIRTIO_BLK_F_SIZE_MAX: u32 = 1;
pub const VIRTIO_BLK_F_SEG_MAX: u32 = 2;
pub const VIRTIO_BLK_F_GEOMETRY: u32 = 4;
pub const VIRTIO_BLK_F_RO: u32 = 5;
pub const VIRTIO_BLK_F_BLK_SIZE: u32 = 6;
pub const VIRTIO_BLK_F_TOPOLOGY: u32 = 10;
pub const VIRTIO_BLK_F_MQ: u32 = 12;
pub const VIRTIO_BLK_F_BARRIER: u32 = 0;
pub const VIRTIO_BLK_F_SCSI: u32 = 7;
pub const VIRTIO_BLK_F_FLUSH: u32 = 9;
pub const VIRTIO_BLK_F_CONFIG_WCE: u32 = 11;
pub const VIRTIO_BLK_F_WCE: u32 = 9;
pub const VIRTIO_BLK_ID_BYTES: u32 = 20;
pub const VIRTIO_BLK_T_IN: u32 = 0;
pub const VIRTIO_BLK_T_OUT: u32 = 1;
pub const VIRTIO_BLK_T_SCSI_CMD: u32 = 2;
pub const VIRTIO_BLK_T_FLUSH: u32 = 4;
pub const VIRTIO_BLK_T_GET_ID: u32 = 8;
pub const VIRTIO_BLK_T_BARRIER: u32 = 2147483648;
pub const VIRTIO_BLK_S_OK: u32 = 0;
pub const VIRTIO_BLK_S_IOERR: u32 = 1;
pub const VIRTIO_BLK_S_UNSUPP: u32 = 2;
pub type __s8 = ::std::os::raw::c_schar;
pub type __u8 = ::std::os::raw::c_uchar;
pub type __s16 = ::std::os::raw::c_short;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __s32 = ::std::os::raw::c_int;
pub type __u32 = ::std::os::raw::c_uint;
pub type __s64 = ::std::os::raw::c_longlong;
pub type __u64 = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct __kernel_fd_set {
    pub fds_bits: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___kernel_fd_set() {
    assert_eq!(
        ::std::mem::size_of::<__kernel_fd_set>(),
        128usize,
        concat!("Size of: ", stringify!(__kernel_fd_set))
    );
    assert_eq!(
        ::std::mem::align_of::<__kernel_fd_set>(),
        8usize,
        concat!("Alignment of ", stringify!(__kernel_fd_set))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__kernel_fd_set),
            "::",
            stringify!(fds_bits)
        )
    );
}
pub type __kernel_sighandler_t =
    ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
pub type __kernel_key_t = ::std::os::raw::c_int;
pub type __kernel_mqd_t = ::std::os::raw::c_int;
pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
pub type __kernel_long_t = ::std::os::raw::c_long;
pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
pub type __kernel_ino_t = __kernel_ulong_t;
pub type __kernel_mode_t = ::std::os::raw::c_uint;
pub type __kernel_pid_t = ::std::os::raw::c_int;
pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
pub type __kernel_uid_t = ::std::os::raw::c_uint;
pub type __kernel_gid_t = ::std::os::raw::c_uint;
pub type __kernel_suseconds_t = __kernel_long_t;
pub type __kernel_daddr_t = ::std::os::raw::c_int;
pub type __kernel_uid32_t = ::std::os::raw::c_uint;
pub type __kernel_gid32_t = ::std::os::raw::c_uint;
pub type __kernel_size_t = __kernel_ulong_t;
pub type __kernel_ssize_t = __kernel_long_t;
pub type __kernel_ptrdiff_t = __kernel_long_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct __kernel_fsid_t {
    pub val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___kernel_fsid_t() {
    assert_eq!(
        ::std::mem::size_of::<__kernel_fsid_t>(),
        8usize,
        concat!("Size of: ", stringify!(__kernel_fsid_t))
    );
    assert_eq!(
        ::std::mem::align_of::<__kernel_fsid_t>(),
        4usize,
        concat!("Alignment of ", stringify!(__kernel_fsid_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__kernel_fsid_t),
            "::",
            stringify!(val)
        )
    );
}
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = ::std::os::raw::c_longlong;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_clock_t = __kernel_long_t;
pub type __kernel_timer_t = ::std::os::raw::c_int;
pub type __kernel_clockid_t = ::std::os::raw::c_int;
pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
pub type __le16 = __u16;
pub type __be16 = __u16;
pub type __le32 = __u32;
pub type __be32 = __u32;
pub type __le64 = __u64;
pub type __be64 = __u64;
pub type __sum16 = __u16;
pub type __wsum = __u32;
pub type __virtio16 = __u16;
pub type __virtio32 = __u32;
pub type __virtio64 = __u64;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct virtio_blk_config {
    pub capacity: __u64,
    pub size_max: __u32,
    pub seg_max: __u32,
    pub geometry: virtio_blk_config_virtio_blk_geometry,
    pub blk_size: __u32,
    pub physical_block_exp: __u8,
    pub alignment_offset: __u8,
    pub min_io_size: __u16,
    pub opt_io_size: __u32,
    pub wce: __u8,
    pub unused: __u8,
    pub num_queues: __u16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct virtio_blk_config_virtio_blk_geometry {
    pub cylinders: __u16,
    pub heads: __u8,
    pub sectors: __u8,
}
#[test]
fn bindgen_test_layout_virtio_blk_config_virtio_blk_geometry() {
    assert_eq!(
        ::std::mem::size_of::<virtio_blk_config_virtio_blk_geometry>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(virtio_blk_config_virtio_blk_geometry)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<virtio_blk_config_virtio_blk_geometry>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(virtio_blk_config_virtio_blk_geometry)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<virtio_blk_config_virtio_blk_geometry>())).cylinders as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config_virtio_blk_geometry),
            "::",
            stringify!(cylinders)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<virtio_blk_config_virtio_blk_geometry>())).heads as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config_virtio_blk_geometry),
            "::",
            stringify!(heads)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<virtio_blk_config_virtio_blk_geometry>())).sectors as *const _
                as usize
        },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config_virtio_blk_geometry),
            "::",
            stringify!(sectors)
        )
    );
}
#[test]
fn bindgen_test_layout_virtio_blk_config() {
    assert_eq!(
        ::std::mem::size_of::<virtio_blk_config>(),
        36usize,
        concat!("Size of: ", stringify!(virtio_blk_config))
    );
    assert_eq!(
        ::std::mem::align_of::<virtio_blk_config>(),
        1usize,
        concat!("Alignment of ", stringify!(virtio_blk_config))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).capacity as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(capacity)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).size_max as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(size_max)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).seg_max as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(seg_max)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).geometry as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(geometry)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).blk_size as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(blk_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<virtio_blk_config>())).physical_block_exp as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(physical_block_exp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<virtio_blk_config>())).alignment_offset as *const _ as usize
        },
        25usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(alignment_offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).min_io_size as *const _ as usize },
        26usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(min_io_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).opt_io_size as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(opt_io_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).wce as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(wce)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).unused as *const _ as usize },
        33usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(unused)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_config>())).num_queues as *const _ as usize },
        34usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_config),
            "::",
            stringify!(num_queues)
        )
    );
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct virtio_blk_outhdr {
    pub type_: __virtio32,
    pub ioprio: __virtio32,
    pub sector: __virtio64,
}
#[test]
fn bindgen_test_layout_virtio_blk_outhdr() {
    assert_eq!(
        ::std::mem::size_of::<virtio_blk_outhdr>(),
        16usize,
        concat!("Size of: ", stringify!(virtio_blk_outhdr))
    );
    assert_eq!(
        ::std::mem::align_of::<virtio_blk_outhdr>(),
        8usize,
        concat!("Alignment of ", stringify!(virtio_blk_outhdr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_outhdr>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_outhdr),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_outhdr>())).ioprio as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_outhdr),
            "::",
            stringify!(ioprio)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_blk_outhdr>())).sector as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_blk_outhdr),
            "::",
            stringify!(sector)
        )
    );
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct virtio_scsi_inhdr {
    pub errors: __virtio32,
    pub data_len: __virtio32,
    pub sense_len: __virtio32,
    pub residual: __virtio32,
}
#[test]
fn bindgen_test_layout_virtio_scsi_inhdr() {
    assert_eq!(
        ::std::mem::size_of::<virtio_scsi_inhdr>(),
        16usize,
        concat!("Size of: ", stringify!(virtio_scsi_inhdr))
    );
    assert_eq!(
        ::std::mem::align_of::<virtio_scsi_inhdr>(),
        4usize,
        concat!("Alignment of ", stringify!(virtio_scsi_inhdr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_scsi_inhdr>())).errors as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_scsi_inhdr),
            "::",
            stringify!(errors)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_scsi_inhdr>())).data_len as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_scsi_inhdr),
            "::",
            stringify!(data_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_scsi_inhdr>())).sense_len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_scsi_inhdr),
            "::",
            stringify!(sense_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<virtio_scsi_inhdr>())).residual as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(virtio_scsi_inhdr),
            "::",
            stringify!(residual)
        )
    );
}
debug log:

solving fcd5a5d7 ...
found fcd5a5d7 in https://spectrum-os.org/git/crosvm

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).