diff options
author | Christof Schmitt <cs@samba.org> | 2023-04-13 11:13:00 -0700 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2023-04-14 12:28:23 +0000 |
commit | 45f026c45c996bb65d2bd3e350587d51d6862a03 (patch) | |
tree | d8594281d25a30e15de43ad01e09256cf452766b /lib/util | |
parent | 31418f95d3a44b2c43081b3095ca813fbdb3d6a1 (diff) | |
download | samba-45f026c45c996bb65d2bd3e350587d51d6862a03.tar.gz |
debug: Only initialize gpfs wrapper when gpfs logging is enabled
This avoids unnecessary attempts to load libgpfs.so when it is not
needed.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Apr 14 12:28:23 UTC 2023 on atb-devel-224
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/debug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c index 95de5ce3595..b83075cb239 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -406,7 +406,9 @@ static void debug_lttng_log(int msg_level, const char *msg, size_t msg_len) static void debug_gpfs_reload(bool enabled, bool previously_enabled, const char *prog_name, char *option) { - gpfswrap_init(); + if (enabled) { + gpfswrap_init(); + } if (enabled && !previously_enabled) { gpfswrap_init_trace(); |