Updates based on feedback

pull/109/head
Dan Everton 3 years ago
parent 4277205e9d
commit 3dff6e8555
No known key found for this signature in database
GPG Key ID: 2AF33A2B189A11B3

@ -400,9 +400,9 @@ fn load_program(prog_type: bpf_prog_type, data: &mut ProgramData) -> Result<(),
let target_kernel_version = match *kernel_version { let target_kernel_version = match *kernel_version {
KernelVersion::Any => { KernelVersion::Any => {
let (major, minor, patch) = crate::sys::kernel_version().unwrap(); let (major, minor, patch) = crate::sys::kernel_version().unwrap();
KernelVersion::Version((major << 16) + (minor << 8) + patch) (major << 16) + (minor << 8) + patch
} }
_ => *kernel_version, _ => (*kernel_version).into(),
}; };
let mut log_buf = VerifierLog::new(); let mut log_buf = VerifierLog::new();
@ -413,7 +413,7 @@ fn load_program(prog_type: bpf_prog_type, data: &mut ProgramData) -> Result<(),
ty: prog_type, ty: prog_type,
insns: instructions, insns: instructions,
license, license,
kernel_version: target_kernel_version.into(), kernel_version: target_kernel_version,
expected_attach_type: data.expected_attach_type, expected_attach_type: data.expected_attach_type,
attach_btf_obj_fd: data.attach_btf_obj_fd, attach_btf_obj_fd: data.attach_btf_obj_fd,
attach_btf_id: data.attach_btf_id, attach_btf_id: data.attach_btf_id,

Loading…
Cancel
Save