validns/validns-0.8-timing.patch
Paul Wouters 398c818354 * Mon Oct 5 17:30:51 EDT 2020 Paul Wouters <pwouters@redhat.com> - 0.8-18
- Resolves: rhbz#1879707 FTBFS: Remove compat-openssl10 requirement
- Resolves: rhbz#1865601 validns: FTBFS in Fedora rawhide/f33
- Resolves: rhbz#1880829 F34FailsToInstall: validns
- Updated notiming patch (-x) notiming patch (-x)
- Pulled in git20160720 updates
2020-10-05 17:35:21 -04:00

81 lines
2.4 KiB
Diff

diff -Naur validns-0.8-orig/common.h validns-0.8/common.h
--- validns-0.8-orig/common.h 2020-10-05 17:25:53.814455909 -0400
+++ validns-0.8/common.h 2020-10-05 17:26:58.696957376 -0400
@@ -72,6 +72,7 @@
int die_on_first_error;
int no_output;
int summary;
+ int notiming;
int verbose;
char *include_path;
int include_path_specified;
diff -Naur validns-0.8-orig/main.c validns-0.8/main.c
--- validns-0.8-orig/main.c 2020-10-05 17:25:53.815455917 -0400
+++ validns-0.8/main.c 2020-10-05 17:28:34.536698118 -0400
@@ -447,6 +447,7 @@
fprintf(stderr, "\t-n N\t\tuse N worker threads\n");
fprintf(stderr, "\t-q\t\tquiet - do not produce any output\n");
fprintf(stderr, "\t-s\t\tprint validation summary/stats\n");
+ fprintf(stderr, "\t-x\t\tskip printing 'time taken' entry in summary/stats\n");
fprintf(stderr, "\t-v\t\tbe extra verbose\n");
fprintf(stderr, "\t-I path\tuse this path for $INCLUDE files\n");
fprintf(stderr, "\t-z origin\tuse this origin as initial $ORIGIN\n");
@@ -523,7 +524,7 @@
struct timeval start, stop;
initialize_globals();
- while ((o = getopt(argc, argv, "fhMqsvI:z:t:p:n:")) != -1) {
+ while ((o = getopt(argc, argv, "fhMqsxvI:z:t:p:n:")) != -1) {
switch(o) {
case 'h':
usage(NULL);
@@ -540,6 +541,9 @@
case 's':
G.opt.summary = 1;
break;
+ case 'x':
+ G.opt.notiming = 1;
+ break;
case 'v':
G.opt.verbose = 1;
break;
@@ -635,8 +639,10 @@
" %d\n", G.stats.not_authoritative);
printf("validation errors: %d\n", G.stats.error_count);
printf("signatures verified: %d\n", G.stats.signatures_verified);
- printf("time taken: %.3fs\n",
+ if (!G.opt.notiming) {
+ printf("time taken: %.3fs\n",
stop.tv_sec - start.tv_sec + (stop.tv_usec - start.tv_usec)/1000000.);
+ }
}
return G.exit_code;
}
diff -Naur validns-0.8-orig/usage.mdwn validns-0.8/usage.mdwn
--- validns-0.8-orig/usage.mdwn 2020-10-05 17:25:53.817455933 -0400
+++ validns-0.8/usage.mdwn 2020-10-05 17:28:54.400851630 -0400
@@ -62,6 +62,9 @@
-s
: print validation summary/stats
+-x
+: skip printing 'time taken' in summary/stats
+
-v
: be extra verbose
diff -Naur validns-0.8-orig/validns.1 validns-0.8/validns.1
--- validns-0.8-orig/validns.1 2020-10-05 17:25:53.818455940 -0400
+++ validns-0.8/validns.1 2020-10-05 17:29:25.670093291 -0400
@@ -75,6 +75,11 @@
.RS
.RE
.TP
+.B -x
+skip printing timing summary/stats
+.RS
+.RE
+.TP
.B \-v
be extra verbose
.RS