MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / get_established_flag

Method get_established_flag

tpm/src/emulator.rs:286–307  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

284 }
285
286 pub fn get_established_flag(&mut self) -> bool {
287 let mut est: PtmEst = PtmEst::new();
288
289 if self.established_flag_cached {
290 return self.established_flag;
291 }
292
293 if let Err(e) = self.run_control_cmd(
294 Commands::CmdGetTpmEstablished,
295 &mut est,
296 0,
297 2 * mem::size_of::<u32>(),
298 ) {
299 error!("Failed to run CmdGetTpmEstablished Control Cmd. Error: {e:?}");
300 return false;
301 }
302
303 self.established_flag_cached = true;
304 self.established_flag = est.resp.bit == 0;
305
306 self.established_flag
307 }
308
309 /// Function to write to data socket and read the response from it
310 pub fn deliver_request(&mut self, cmd: &mut BackendCmd) -> Result<()> {

Callers 2

readMethod · 0.80
newMethod · 0.80

Calls 2

newFunction · 0.85
run_control_cmdMethod · 0.80

Tested by

no test coverage detected