summaryrefslogtreecommitdiff
path: root/flash_unlock.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-08-27 13:32:25 -0700
committerBrian Norris <computersforpeace@gmail.com>2015-11-11 14:05:36 -0800
commit136ee37a3ec6d91b326b2efbead27c91fc0863b5 (patch)
tree89ee3834e74051f736bcaf7d15af9824b28e126d /flash_unlock.c
parent9e2346121dd0745a444d719a33bf0774b72343b4 (diff)
flash_{un,}lock: support --version flag
Just use the common helper macro. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'flash_unlock.c')
-rw-r--r--flash_unlock.c4
1 files changed, 4 insertions, 0 deletions
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;