From: claudio Date: Fri, 26 May 2023 14:57:38 +0000 (+0000) Subject: Properly account del_extra_files and add the value to the json header. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1438586ae9958ee1fe32be1c1acfa19b639d918f;p=openbsd Properly account del_extra_files and add the value to the json header. OK tb@ (from a larger diff) --- diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 897b9a3548e..df16465d4fc 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.237 2023/05/25 12:52:56 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.238 2023/05/26 14:57:38 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -755,6 +755,7 @@ sum_repostats(const struct repo *rp, const struct repostats *in, void *arg) out->del_files += in->del_files; out->extra_files += in->extra_files; + out->del_extra_files += in->del_extra_files; out->del_dirs += in->del_dirs; timespecadd(&in->sync_time, &out->sync_time, &out->sync_time); } diff --git a/usr.sbin/rpki-client/output-json.c b/usr.sbin/rpki-client/output-json.c index 39f1cbdd3e7..f68872e5998 100644 --- a/usr.sbin/rpki-client/output-json.c +++ b/usr.sbin/rpki-client/output-json.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output-json.c,v 1.37 2023/05/03 09:54:25 claudio Exp $ */ +/* $OpenBSD: output-json.c,v 1.38 2023/05/26 14:57:38 claudio Exp $ */ /* * Copyright (c) 2019 Claudio Jeker * @@ -73,8 +73,10 @@ outputheader_json(struct stats *st) json_do_int("vaps", st->repo_tal_stats.vaps); json_do_int("uniquevaps", st->repo_tal_stats.vaps_uniqs); json_do_int("cachedir_del_files", st->repo_stats.del_files); - json_do_int("cachedir_superfluous_files", st->repo_stats.extra_files); json_do_int("cachedir_del_dirs", st->repo_stats.del_dirs); + json_do_int("cachedir_superfluous_files", st->repo_stats.extra_files); + json_do_int("cachedir_del_superfluous_files", + st->repo_stats.del_extra_files); json_do_end(); }