MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / print_ec_version

Function print_ec_version

framework_lib/src/ec_binary.rs:62–76  ·  view source on GitHub ↗

Print pretty information about the EC version

(ver: &ImageVersionData, ro: bool)

Source from the content-addressed store, hash-verified

60
61/// Print pretty information about the EC version
62pub fn print_ec_version(ver: &ImageVersionData, ro: bool) {
63 println!("EC");
64 println!(" Type: {:>20}", if ro { "RO" } else { "RW" });
65 println!(" Version: {:>20}", ver.version);
66 println!(" RollbackVer:{:>20}", ver.rollback_version);
67 println!(" Platform: {:>20}", ver.details.platform);
68 let version = format!(
69 "{}.{}.{}",
70 ver.details.major, ver.details.minor, ver.details.patch
71 );
72 println!(" Version: {:>20}", version);
73 println!(" Commit: {:>20}", ver.details.commit);
74 println!(" Size: {:>20} B", ver.size);
75 println!(" Size: {:>20} KB", ver.size / 1024);
76}
77
78fn parse_ec_version(data: &_ImageVersionData) -> Option<ImageVersionData> {
79 let version = std::str::from_utf8(&data.version)

Callers 1

analyze_ec_fwFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected