Now add a summary of the number of executed instructions in case
of success. Don't add that message when printing the trace to
stdout (`-t -`).
Tested:
a) master/apprentice mode
b) trace mode to file
c) trace mode to stdout
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
---
risu.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/risu.c b/risu.c
index 36fc82a..740663a 100644
--- a/risu.c
+++ b/risu.c
@@ -551,6 +551,7 @@ int main(int argc, char **argv)
struct option *longopts;
char *shortopts;
stack_t ss;
+ int ret;
longopts = setup_options(&shortopts);
@@ -635,8 +636,15 @@ int main(int argc, char **argv)
arch_init();
if (ismaster) {
- return master();
+ ret = master();
} else {
- return apprentice();
+ ret = apprentice();
}
+
+ if (ret == EXIT_SUCCESS && (!trace || (trace && strcmp(trace_fn, "-") !=
0))) {