diff options
author | João Valverde <j@v6e.pt> | 2022-06-04 22:28:45 +0100 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-06-05 21:31:36 +0000 |
commit | 2939c6d0dc7f91ade4d20283fdcbbb30a25ece02 (patch) | |
tree | 6e310508fbb009b4e642471a5b3a934766908e38 | |
parent | 2ac2b0670a4ae0d0ea0d481f42f23885aa8c10ce (diff) |
Version info: Do not show plugin count
Plugin count is dependant on initialization order and showing
zero plugins loaded can be misleading.
-rw-r--r-- | test/fixtures_ws.py | 2 | ||||
-rw-r--r-- | ui/version_info.c | 25 |
2 files changed, 17 insertions, 10 deletions
diff --git a/test/fixtures_ws.py b/test/fixtures_ws.py index 924797e4e3..8f4ba7e0d9 100644 --- a/test/fixtures_ws.py +++ b/test/fixtures_ws.py @@ -182,7 +182,7 @@ def features(cmd_tshark, make_env): have_gnutls='with GnuTLS' in tshark_v, have_pkcs11='and PKCS #11 support' in tshark_v, have_brotli='with brotli' in tshark_v, - have_plugins='with binary plugins' in tshark_v, + have_plugins='binary plugins supported' in tshark_v, ) diff --git a/ui/version_info.c b/ui/version_info.c index 3b9d1b1b13..a717f17e2c 100644 --- a/ui/version_info.c +++ b/ui/version_info.c @@ -188,12 +188,21 @@ get_compiled_version_info(gather_feature_func gather_compile) l = g_list_reverse(l); g_list_foreach(l, feature_to_gstring, str); + +#ifdef HAVE_PLUGINS + g_string_append(str, ", with binary plugins"); +#else + g_string_append(str, ", without binary plugins"); +#endif + #ifdef WS_DISABLE_DEBUG g_string_append(str, ", release build"); #endif + #ifdef WS_DISABLE_ASSERT g_string_append(str, ", without assertions"); #endif + g_string_append(str, "."); end_string(str); free_features(&l); @@ -453,27 +462,25 @@ get_runtime_version_info(gather_feature_func gather_runtime) if (gather_runtime != NULL) { gather_runtime(&l); } + + l = g_list_reverse(l); + g_list_foreach(l, feature_to_gstring, str); + /* * Display LC_CTYPE as a relevant, portable and sort of representative * locale configuration without being exceedingly verbose and including * the whole shebang of categories using LC_ALL. */ if ((lc = setlocale(LC_CTYPE, NULL)) != NULL) { - with_feature(&l, "LC_TYPE=%s", lc); + g_string_append_printf(str, ", with LC_TYPE=%s", lc); } + #ifdef HAVE_PLUGINS if (g_module_supported()) { - with_feature(&l, "binary plugins (%d loaded)", plugins_get_count()); - } - else { - without_feature(&l, "binary plugins (not supported by the platform)"); + g_string_append(str, ", binary plugins supported"); } -#else - without_feature(&l, "binary plugins"); #endif - l = g_list_reverse(l); - g_list_foreach(l, feature_to_gstring, str); g_string_append_c(str, '.'); end_string(str); free_features(&l); |