From 136ee37a3ec6d91b326b2efbead27c91fc0863b5 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 27 Aug 2015 13:32:25 -0700 Subject: flash_{un,}lock: support --version flag Just use the common helper macro. Signed-off-by: Brian Norris --- flash_unlock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flash_unlock.c b/flash_unlock.c index 777e437..9a24b5f 100644 --- a/flash_unlock.c +++ b/flash_unlock.c @@ -39,6 +39,7 @@ static void usage(int status) static const char short_opts[] = "h"; static const struct option long_opts[] = { { "help", no_argument, 0, 'h' }, + { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 }, }; @@ -61,6 +62,9 @@ int main(int argc, char *argv[]) case 'h': usage(0); break; + case 'v': + common_print_version(); + exit(0); default: usage(1); break; -- cgit v1.2.3