diff options
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r-- | util/cbfstool/cbfstool.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index cae1227200..b6a486fd37 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -973,15 +973,15 @@ int main(int argc, char **argv) WARN("Unknown type '%s' ignored\n", optarg); break; - case 'c': - if (!strncasecmp(optarg, "lzma", 5)) - param.compression = CBFS_COMPRESS_LZMA; - else if (!strncasecmp(optarg, "none", 5)) - param.compression = CBFS_COMPRESS_NONE; + case 'c': { + int algo = cbfs_parse_comp_algo(optarg); + if (algo >= 0) + param.compression = algo; else - WARN("Unknown compression '%s'" - " ignored.\n", optarg); + WARN("Unknown compression '%s' ignored.\n", + optarg); break; + } case 'M': param.fmap = optarg; break; |