aya: fix create pinned map path.

`MapData::create_pinned` is supposed to call `map.pin`(BPF_OBJ_PIN) if
`BPF_OBJ_GET` syscall return error, but it joins `name` redundantly,
making `path/map_name` to be `path/map_name/map_name`.This
commit fixed it.
pull/803/head
Lee 2 years ago
parent c547dd7bcc
commit 8e5f1c62e3

@ -490,7 +490,6 @@ impl MapData {
}
Err(_) => {
let mut map = Self::create(obj, name, btf_fd)?;
let path = path.join(name);
map.pin(&path).map_err(|error| MapError::PinError {
name: Some(name.into()),
error,

Loading…
Cancel
Save