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

Method check_caps

tpm/src/emulator.rs:190–205  ·  view source on GitHub ↗

Check if minimum set of capabilities are supported

(&mut self)

Source from the content-addressed store, hash-verified

188
189 /// Check if minimum set of capabilities are supported
190 fn check_caps(&mut self) -> bool {
191 /* min. required capabilities for TPM 2.0*/
192 let caps: PtmCap = PTM_CAP_INIT
193 | PTM_CAP_SHUTDOWN
194 | PTM_CAP_GET_TPMESTABLISHED
195 | PTM_CAP_SET_LOCALITY
196 | PTM_CAP_RESET_TPMESTABLISHED
197 | PTM_CAP_SET_DATAFD
198 | PTM_CAP_STOP
199 | PTM_CAP_SET_BUFFERSIZE;
200
201 if (self.caps & caps) != caps {
202 return false;
203 }
204 true
205 }
206
207 ///
208 /// # Arguments

Callers 1

newMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected