X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FBrotliCompress%2Ftools%2Fbro.c;h=ef4592d420f43d90663202f3f135ec38a025eb28;hp=2fa9f05e7f21f68d73ea9dc4a1ac376fbede8b02;hb=98cb468435be54c3191f4bca48cf5135b1927eaf;hpb=9ee3283bfb466c44afa5692591445cd377f08377 diff --git a/BaseTools/Source/C/BrotliCompress/tools/bro.c b/BaseTools/Source/C/BrotliCompress/tools/bro.c index 2fa9f05e7f..ef4592d420 100644 --- a/BaseTools/Source/C/BrotliCompress/tools/bro.c +++ b/BaseTools/Source/C/BrotliCompress/tools/bro.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "../dec/decode.h" #include "../enc/encode.h" @@ -67,6 +68,11 @@ static int ParseQuality(const char* s, int* quality) { return 0; } +#define UTILITY_NAME "Brotli" +#define UTILITY_MAJOR_VERSION 0 +#define UTILITY_MINOR_VERSION 5 +#define UTILITY_REVERSION 2 + static void ParseArgv(int argc, char **argv, char **input_path, char **output_path, @@ -110,6 +116,15 @@ static void ParseArgv(int argc, char **argv, } *verbose = 1; continue; + } else if (!strcmp("--version", argv[k])) { + fprintf(stderr, + "%s Version %d.%d.%d %s\n", + UTILITY_NAME, + UTILITY_MAJOR_VERSION, + UTILITY_MINOR_VERSION, + UTILITY_REVERSION, + __BUILD_VERSION); + exit(1); } if (k < argc - 1) { if (!strcmp("--input", argv[k]) || @@ -177,7 +192,8 @@ error: fprintf(stderr, "Usage: %s [--force] [--quality n] [--gap n] [--decompress]" " [--input filename] [--output filename] [--repeat iters]" - " [--verbose] [--window n] [--custom-dictionary filename]\n", + " [--verbose] [--window n] [--custom-dictionary filename]" + " [--version]\n", argv[0]); exit(1); }