diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-15 15:04:57 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-15 15:04:57 +0100 |
commit | 23970766e71aa66c49a2a782dc94f5a58d4e4616 (patch) | |
tree | db929ea359d99e1ccd7511c56d8f755ef798e094 | |
parent | a581465ca935d59d6627a537456517cef6334380 (diff) | |
download | monitoring-plugins-23970766e71aa66c49a2a782dc94f5a58d4e4616.tar.gz |
check_swap stuff: Add comments to ifdef stuff to improve readability
-rw-r--r-- | plugins/check_swap.d/swap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_swap.d/swap.c b/plugins/check_swap.d/swap.c index 354efdbf..ece05fd2 100644 --- a/plugins/check_swap.d/swap.c +++ b/plugins/check_swap.d/swap.c | |||
@@ -30,7 +30,7 @@ swap_result get_swap_data(swap_config config) { | |||
30 | } | 30 | } |
31 | 31 | ||
32 | return getSwapFromProcMeminfo(PROC_MEMINFO); | 32 | return getSwapFromProcMeminfo(PROC_MEMINFO); |
33 | #else | 33 | #else // HAVE_PROC_MEMINFO |
34 | # ifdef HAVE_SWAP | 34 | # ifdef HAVE_SWAP |
35 | if (verbose >= 3) { | 35 | if (verbose >= 3) { |
36 | printf("Using swap command %s with format: %s\n", SWAP_COMMAND, SWAP_FORMAT); | 36 | printf("Using swap command %s with format: %s\n", SWAP_COMMAND, SWAP_FORMAT); |
@@ -48,13 +48,13 @@ swap_result get_swap_data(swap_config config) { | |||
48 | } else { | 48 | } else { |
49 | return getSwapFromSwapCommand(config, SWAP_COMMAND, SWAP_FORMAT); | 49 | return getSwapFromSwapCommand(config, SWAP_COMMAND, SWAP_FORMAT); |
50 | } | 50 | } |
51 | # else | 51 | # else // HAVE_SWAP |
52 | # ifdef CHECK_SWAP_SWAPCTL_SVR4 | 52 | # ifdef CHECK_SWAP_SWAPCTL_SVR4 |
53 | return getSwapFromSwapctl_SRV4(); | 53 | return getSwapFromSwapctl_SRV4(); |
54 | # else | 54 | # else // CHECK_SWAP_SWAPCTL_SVR4 |
55 | # ifdef CHECK_SWAP_SWAPCTL_BSD | 55 | # ifdef CHECK_SWAP_SWAPCTL_BSD |
56 | return getSwapFromSwapctl_BSD(); | 56 | return getSwapFromSwapctl_BSD(); |
57 | # else | 57 | # else // CHECK_SWAP_SWAPCTL_BSD |
58 | # error No way found to retrieve swap | 58 | # error No way found to retrieve swap |
59 | # endif /* CHECK_SWAP_SWAPCTL_BSD */ | 59 | # endif /* CHECK_SWAP_SWAPCTL_BSD */ |
60 | # endif /* CHECK_SWAP_SWAPCTL_SVR4 */ | 60 | # endif /* CHECK_SWAP_SWAPCTL_SVR4 */ |