[Yellowstone] add ability to read GPT.
This commit is contained in:
parent
090441ad04
commit
b880c11ac7
3 changed files with 153 additions and 1 deletions
|
|
@ -88,6 +88,19 @@ impl YellowstoneServerHandler for YellowstoneServerImpl {
|
|||
}
|
||||
|
||||
fn get_denali(&mut self) -> Result<DenaliInfo, ZError> {
|
||||
todo!()
|
||||
match self.service_map.get("denali") {
|
||||
Some(ep_cap) => crate::gpt::read_gpt(denali::DenaliClient::new(
|
||||
ep_cap.duplicate(Capability::PERMS_ALL).unwrap(),
|
||||
))
|
||||
.map(|lba| DenaliInfo {
|
||||
denali_endpoint: ep_cap.duplicate(Capability::PERMS_ALL).unwrap().release(),
|
||||
device_id: 0,
|
||||
lba_offset: lba,
|
||||
}),
|
||||
None => {
|
||||
mammoth::debug!("Denali not yet registered");
|
||||
Err(ZError::FAILED_PRECONDITION)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue