From 3211ab0ed7d37f33087b0284907277457f4b6528 Mon Sep 17 00:00:00 2001 From: "Rivas Paz, Jose L" Date: Mon, 24 Mar 2025 21:19:45 +0000 Subject: [PATCH] app: include die id in `info` command. This patch updates the current die value shown in the `info` command. If a die name is defined in a record, the name will be shown, otherwise the die id numeric value will be shown in the info command. For Crash Log records that don't have any die value defined, the `info` command will keep showing an empty string. Signed-off-by: Rivas Paz, Jose L --- app/src/decode.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/decode.rs b/app/src/decode.rs index 91ed95f..46844ba 100644 --- a/app/src/decode.rs +++ b/app/src/decode.rs @@ -38,6 +38,16 @@ pub fn info(cm: &CollateralManager, input: &Path) -> Resul .checksum() .map_or("", |check| if check { "Valid" } else { "Invalid" }); + let die = if let Some(die_id) = record.header.die(cm) { + die_id + } else { + &record + .header + .die_id() + .map(|die_id| die_id.to_string()) + .unwrap_or_default() + }; + println!( "{:>2}-{:<2} {:<16} {:>5} {:<8} {:>6} {:>4} {:<9} {}", i, @@ -48,7 +58,7 @@ pub fn info(cm: &CollateralManager, input: &Path) -> Resul record.header.record_size(), record.header.socket_id(), checksum, - record.header.die(cm).unwrap_or(""), + die ); } }