()
| 212 | } |
| 213 | |
| 214 | fn cmd_eventlog() -> Result<()> { |
| 215 | let event_logs = cc_eventlog::tdx::read_event_log().context("Failed to read event logs")?; |
| 216 | serde_json::to_writer_pretty(io::stdout(), &event_logs) |
| 217 | .context("Failed to write event logs")?; |
| 218 | Ok(()) |
| 219 | } |
| 220 | |
| 221 | fn hex_decode(hex_str: &str) -> Result<Vec<u8>> { |
| 222 | hex::decode(hex_str.trim_start_matches("0x")).context("Invalid hex string") |
no test coverage detected