MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / read_generation

Function read_generation

tdx-attest/src/linux.rs:394–401  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

392}
393
394fn read_generation(path: &str) -> Result<i64> {
395 let content = fs::read_to_string(path)
396 .map_err(|e| TdxAttestError::Unexpected(format!("read {path}: {e}")))?;
397 content
398 .trim()
399 .parse()
400 .map_err(|e| TdxAttestError::Unexpected(format!("parse generation: {e}")))
401}
402
403fn write_inblob_with_retry(path: &str, data: &TdxReportData) -> Result<()> {
404 const RETRY_WAIT_MS: u64 = 10000; // 10 seconds

Callers 2

get_quote_via_configfsFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected