aya: maps: rename from_pinned() to open_pinned()

pull/167/head
Alessandro Decina 3 years ago
parent 9b1ab96ad5
commit 4e9bc32a3d

@ -355,7 +355,7 @@ impl<'a> BpfLoader<'a> {
None => return Err(BpfError::NoPinPath),
};
// try to open map in case it's already pinned
match map.from_pinned(&name, path) {
match map.open_pinned(&name, path) {
Ok(fd) => {
map.pinned = true;
fd as RawFd

@ -168,7 +168,7 @@ impl Map {
Ok(fd)
}
pub(crate) fn from_pinned<P: AsRef<Path>>(
pub(crate) fn open_pinned<P: AsRef<Path>>(
&mut self,
name: &str,
path: P,

Loading…
Cancel
Save