summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--memtool.17
-rw-r--r--memtool.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/memtool.1 b/memtool.1
index f18ba12..0bc0ec3 100644
--- a/memtool.1
+++ b/memtool.1
@@ -2,6 +2,8 @@
.SH NAME
memtool \- display and modify memory
.SH SYNOPSIS
+.B memtool -V
+.br
.B memtool md
.RB [\| \-b \||\| \-w \||\| \-l \||\| \-q \|]
.RB [\| \-x \|]
@@ -35,6 +37,11 @@ the tool, but either the machine or the caller.
.SH OPTIONS
.TP
+.B \-V
+Dump memtool version and exit
+
+.SH COMMON OPTIONS FOR SUBCOMMANDS
+.TP
.B \-b
Use byte wise (8-bit) access
.TP
diff --git a/memtool.c b/memtool.c
index b790c8e..9dc594d 100644
--- a/memtool.c
+++ b/memtool.c
@@ -479,6 +479,11 @@ int main(int argc, char **argv)
if (!strcmp(basename(argv[0]), "memtool")) {
argv++;
argc--;
+
+ if (!strcmp(argv[0], "-V")) {
+ printf("%s\n", PACKAGE_STRING);
+ return EXIT_SUCCESS;
+ }
}
if (argc < 1) {