From 31f24a2a553b7bc5ebbb702964ba90227d5eac47 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 28 Feb 2023 19:15:13 +0100 Subject: [PATCH] Add breakdown option --- src/emu/emu_args.c | 9 +++++++-- src/emu/emu_args.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/emu/emu_args.c b/src/emu/emu_args.c index c044db6..e2aa39e 100644 --- a/src/emu/emu_args.c +++ b/src/emu/emu_args.c @@ -17,13 +17,15 @@ usage(void) { rerr("%s -- version %s\n", progname, version); rerr("\n"); - rerr("Usage: %s [-c offsetfile] [-lh] tracedir\n", progname); + rerr("Usage: %s [-c offsetfile] [-blh] tracedir\n", progname); rerr("\n"); rerr("Options:\n"); rerr(" -c offsetfile Use the given offset file to correct\n"); rerr(" the clocks among nodes. It can be\n"); rerr(" generated by the ovnisync program\n"); rerr("\n"); + rerr(" -b Enable breakdown model (costly)\n"); + rerr("\n"); rerr(" -l Enable linter mode. Extra tests will\n"); rerr(" be performed.\n"); rerr("\n"); @@ -42,7 +44,7 @@ emu_args_init(struct emu_args *args, int argc, char *argv[]) memset(args, 0, sizeof(struct emu_args)); int opt; - while ((opt = getopt(argc, argv, "c:lh")) != -1) { + while ((opt = getopt(argc, argv, "bc:lh")) != -1) { switch (opt) { case 'c': args->clock_offset_file = optarg; @@ -50,6 +52,9 @@ emu_args_init(struct emu_args *args, int argc, char *argv[]) case 'l': args->linter_mode = 1; break; + case 'b': + args->breakdown = 1; + break; case 'h': default: /* '?' */ usage(); diff --git a/src/emu/emu_args.h b/src/emu/emu_args.h index 7dc17fa..f2267d6 100644 --- a/src/emu/emu_args.h +++ b/src/emu/emu_args.h @@ -6,6 +6,7 @@ struct emu_args { int linter_mode; + int breakdown; char *clock_offset_file; char *tracedir; };