<p>Patrick Georgi <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/28054">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  build bot (Jenkins): Verified
  Nico Huber: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/autoport: Adapt logmaker for newer ACPI versions<br><br>acpidump now creates dumps with 4 spaces instead of 2 in front of the hex dump,<br>so be a bit smarter about the input with regexp.<br><br>Tested with X220 autoport logs: Still creates the same coreboot code.<br><br>Change-Id: I8d48c09cdff9432f394b350540ea9765fc942781<br>Signed-off-by: Arthur Heymans <arthur@aheymans.xyz><br>Reviewed-on: https://review.coreboot.org/28054<br>Tested-by: build bot (Jenkins) <no-reply@coreboot.org><br>Reviewed-by: Nico Huber <nico.h@gmx.de><br>---<br>M util/autoport/log_reader.go<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/autoport/log_reader.go b/util/autoport/log_reader.go</span><br><span>index c94d182..d9a687a 100644</span><br><span>--- a/util/autoport/log_reader.go</span><br><span>+++ b/util/autoport/log_reader.go</span><br><span>@@ -6,6 +6,7 @@</span><br><span>  "fmt"</span><br><span>      "log"</span><br><span>      "os"</span><br><span style="color: hsl(120, 100%, 40%);">+        "regexp"</span><br><span>   "strconv"</span><br><span>  "strings"</span><br><span> )</span><br><span>@@ -106,11 +107,13 @@</span><br><span>     curTable := ""</span><br><span>     for scanner.Scan() {</span><br><span>                 line := scanner.Text()</span><br><span style="color: hsl(120, 100%, 40%);">+                /* Only supports ACPI tables up to 0x10000 in size, FIXME if needed */</span><br><span style="color: hsl(120, 100%, 40%);">+                is_hexline, _ := regexp.MatchString(" *[0-9A-Fa-f]{4}: ", line)</span><br><span>            switch {</span><br><span>             case len(line) >= 6 && line[5] == '@':</span><br><span>                    curTable = line[0:4]</span><br><span>                         Tables[curTable] = make([]byte, 0, 100000)</span><br><span style="color: hsl(0, 100%, 40%);">-              case len(line) > 7 && line[0:2] == "  " && isXDigit(line[2]) && isXDigit(line[3]) && isXDigit(line[4]) && isXDigit(line[5]) && line[6] == ':':</span><br><span style="color: hsl(120, 100%, 40%);">+           case is_hexline:</span><br><span>                     Tables[curTable] = l.AssignHexLine(line, Tables[curTable])</span><br><span>           }</span><br><span>    }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28054">change 28054</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/28054"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I8d48c09cdff9432f394b350540ea9765fc942781 </div>
<div style="display:none"> Gerrit-Change-Number: 28054 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz> </div>
<div style="display:none"> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> </div>
<div style="display:none"> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>