memzap

replay memory writes
git clone git://git.2f30.org/memzap
Log | Files | Refs | README | LICENSE

commit 5b17689d28db4818c7f389f0db97f937654e0ebd
parent f53e7695c0fa25a293ea94e2add2a8a39b5bfe27
Author: sin <sin@2f30.org>
Date:   Mon,  4 Mar 2013 15:28:27 +0000

memzap: Add -V flag for versioning info

Diffstat:
Mmemzap.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/memzap.c b/memzap.c @@ -12,6 +12,7 @@ usage(const char *prog) fprintf(stderr, " -r\tSpecify region to trace\n"); fprintf(stderr, " -l\tLength of traced region\n"); fprintf(stderr, " -v\tEnable verbose output\n"); + fprintf(stderr, " -V\tVersioning info\n"); fprintf(stderr, " -h\tThis help screen\n"); } @@ -54,7 +55,7 @@ main(int argc, char *argv[]) char mdiff_path[PATH_MAX - 1]; bool once = false; - while ((c = getopt(argc, argv, "hs:l:r:v")) != -1) { + while ((c = getopt(argc, argv, "hs:l:r:vV")) != -1) { switch (c) { case 'h': usage(prog); @@ -62,6 +63,9 @@ main(int argc, char *argv[]) case 'v': verbose = 1; break; + case 'V': + printf("%s\n", VERSION); + return 0; case 'r': addr = (char *)strtoul(optarg, NULL, 16); break;