<p>Julius Werner has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26389">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cbfs-compression-tool: Minor edge case handling fixes<br><br>This patch makes cbfs-compression-tool fail and exit if it cannot parse<br>the supplied compression algorithm, rather than just falling back to<br>"none". It also changes the algorithm detection to strcasecmp() so that<br>you can use either "LZ4" or "lz4" (or "lZ4" or whatever).<br><br>Change-Id: I375dbaeefaa0d4b0c5be81bf7668f8f330f1cf61<br>Signed-off-by: Julius Werner <jwerner@chromium.org><br>---<br>M util/cbfstool/cbfscomptool.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/26389/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/cbfstool/cbfscomptool.c b/util/cbfstool/cbfscomptool.c</span><br><span>index 1021bc8..33303ab 100644</span><br><span>--- a/util/cbfstool/cbfscomptool.c</span><br><span>+++ b/util/cbfstool/cbfscomptool.c</span><br><span>@@ -97,11 +97,12 @@</span><br><span> </span><br><span>      const struct typedesc_t *algo = &types_cbfs_compression[0];</span><br><span>      while (algo->name != NULL) {</span><br><span style="color: hsl(0, 100%, 40%);">-         if (strcmp(algo->name, algoname) == 0) break;</span><br><span style="color: hsl(120, 100%, 40%);">+              if (strcasecmp(algo->name, algoname) == 0) break;</span><br><span>                 algo++;</span><br><span>      }</span><br><span>    if (algo->name == NULL) {</span><br><span>                 fprintf(stderr, "algo '%s' is not supported.\n", algoname);</span><br><span style="color: hsl(120, 100%, 40%);">+         return 1;</span><br><span>    }</span><br><span> </span><br><span>        comp_func_ptr comp = compression_function(algo->type);</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26389">change 26389</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/26389"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I375dbaeefaa0d4b0c5be81bf7668f8f330f1cf61 </div>
<div style="display:none"> Gerrit-Change-Number: 26389 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Julius Werner <jwerner@chromium.org> </div>