summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/cbfstool/cbfscomptool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/cbfscomptool.c b/util/cbfstool/cbfscomptool.c
index 1021bc858c..33303ab62c 100644
--- a/util/cbfstool/cbfscomptool.c
+++ b/util/cbfstool/cbfscomptool.c
@@ -97,11 +97,12 @@ int compress(char *infile, char *outfile, char *algoname)
const struct typedesc_t *algo = &types_cbfs_compression[0];
while (algo->name != NULL) {
- if (strcmp(algo->name, algoname) == 0) break;
+ if (strcasecmp(algo->name, algoname) == 0) break;
algo++;
}
if (algo->name == NULL) {
fprintf(stderr, "algo '%s' is not supported.\n", algoname);
+ return 1;
}
comp_func_ptr comp = compression_function(algo->type);