[PATCH i2c-tools v4 6/8] decode-dimms: Add second level separator
Stephen Horvath <[email protected]> Thu, 23 Jul 2026 13:40:15 +0000
| Newsgroups | org.kernel.vger.linux-i2c |
|---|---|
| Message-ID | <[email protected]> |
Adds `prints2` for a second level of separation useful for listing subsections for XMP & EXPO profiles, or error log entries. Signed-off-by: Stephen Horvath <[email protected]> --- eeprom/decode-dimms | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index 7f51642..7b8dbb8 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -712,6 +712,18 @@ sub real_prints($) # print separator w/ given text } } +sub real_prints2($) # print second level separator w/ given text +{ + my ($label, $ncol) = @_; + $ncol = 1 unless $ncol; + if ($opt_html) { + $label = html_encode($label); + print "<tr><td style=\"font-weight: normal; text-align: center;\" colspan=\"".(1+$ncol)."\">$label</td></tr>\n"; + } else { + print "\n--== $label ==--\n"; + } +} + sub printh($$) # print header w/ given text { my ($header, $sub) = @_; @@ -759,6 +771,12 @@ sub prints($) # print separator w/ given text push @{$dimm[$current]->{output}}, \@output; } +sub prints2($) # print second level separator w/ given text +{ + my @output = (\&real_prints2, @_); + push @{$dimm[$current]->{output}}, \@output; +} + # Helper functions sub tns1($) # print a time in ns, with 1 decimal digit -- 2.53.0