diff --git a/src/emu/ovnisort.c b/src/emu/ovnisort.c index 86c07d1..e7c0b47 100644 --- a/src/emu/ovnisort.c +++ b/src/emu/ovnisort.c @@ -49,7 +49,7 @@ enum operation_mode { SORT, static char *tracedir = NULL; static enum operation_mode operation_mode = SORT; -static const size_t max_look_back = 1000000; +static size_t max_look_back = 1000000; static void ring_reset(struct ring *r) @@ -404,6 +404,9 @@ usage(void) rerr(" -c Enable check mode: don't sort, ensure the\n"); rerr(" trace is already sorted.\n"); rerr("\n"); + rerr(" -n Set the number of events to look back.\n"); + rerr(" Defaul: %ld\n", max_look_back); + rerr("\n"); rerr(" tracedir The trace directory generated by ovni.\n"); rerr("\n"); @@ -415,11 +418,14 @@ parse_args(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "c")) != -1) { + while ((opt = getopt(argc, argv, "cn:")) != -1) { switch (opt) { case 'c': operation_mode = CHECK; break; + case 'n': + max_look_back = atol(optarg); + break; default: /* '?' */ usage(); }