aya: Fix review comments from #387

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/391/head
Dave Tucker 2 years ago
parent eb26a6b116
commit de6fa98963

@ -48,14 +48,14 @@ use thiserror::Error;
use crate::{ use crate::{
generated::bpf_map_type, generated::bpf_map_type,
obj, obj::{self, parse_map_info},
pin::PinError, pin::PinError,
sys::{ sys::{
bpf_create_map, bpf_get_object, bpf_map_get_info_by_fd, bpf_map_get_next_key, bpf_create_map, bpf_get_object, bpf_map_get_info_by_fd, bpf_map_get_next_key,
bpf_pin_object, kernel_version, bpf_pin_object, kernel_version,
}, },
util::nr_cpus, util::nr_cpus,
Pod, PinningType, Pod,
}; };
mod map_lock; mod map_lock;
@ -325,7 +325,7 @@ impl Map {
})?; })?;
Ok(Map { Ok(Map {
obj: obj::parse_map_info(info, crate::PinningType::ByName), obj: parse_map_info(info, PinningType::ByName),
fd: Some(fd), fd: Some(fd),
btf_fd: None, btf_fd: None,
pinned: true, pinned: true,
@ -344,7 +344,7 @@ impl Map {
})?; })?;
Ok(Map { Ok(Map {
obj: obj::parse_map_info(info, crate::PinningType::None), obj: parse_map_info(info, PinningType::None),
fd: Some(fd), fd: Some(fd),
btf_fd: None, btf_fd: None,
pinned: false, pinned: false,

Loading…
Cancel
Save