Closed
Description
Input C/C++ Header
#include <linux/dm-ioctl.h>
Bindgen Invocation
let bindings = Builder::default()
.header("dm-ioctl.h")
.derive_debug(true)
.derive_default(true)
.generate()
.expect("Could not generate bindings");
Actual Results
#[repr(C)] [421/1915]
#[derive(Copy, Clone)]
pub struct dm_ioctl {
pub version: [__u32; 3usize],
pub data_size: __u32,
pub data_start: __u32,
pub target_count: __u32,
pub open_count: __s32,
pub flags: __u32,
pub event_nr: __u32,
pub padding: __u32,
pub dev: __u64,
pub name: [::std::os::raw::c_char; 128usize],
pub uuid: [::std::os::raw::c_char; 129usize],
pub data: [::std::os::raw::c_char; 7usize],
}
Expected Results
I would expect dm_ioctl
to have a #[derive(Debug)]
. I tested this generated struct in the Rust playground and it successfully derives Debug when the directive is added. Was this an intentional design decision or does this appear to be a bug? Default
appears not to be implemented for some of the members of the struct so that part makes sense.