diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 03:51:37 +0100 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 03:51:37 +0100 |
commit | 5c6d79dac31b55d78fcbb10c48ab357574307bc0 (patch) | |
tree | 043498b9270c8b76166c792900dd55ab8fa44086 | |
parent | c16bc4024caed74a3ceb9168c7e50ce3ad09dacb (diff) | |
download | monitoring-plugins-5c6d79dac31b55d78fcbb10c48ab357574307bc0.tar.gz |
check_ide_smart: do not export local symbols
-rw-r--r-- | plugins/check_ide_smart.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index 550cd981..fc75e53d 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c | |||
@@ -40,7 +40,7 @@ const char *email = "devel@monitoring-plugins.org"; | |||
40 | #include "common.h" | 40 | #include "common.h" |
41 | #include "utils.h" | 41 | #include "utils.h" |
42 | 42 | ||
43 | void print_help(void); | 43 | static void print_help(void); |
44 | void print_usage(void); | 44 | void print_usage(void); |
45 | 45 | ||
46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
@@ -118,14 +118,12 @@ struct { | |||
118 | char *text; | 118 | char *text; |
119 | } | 119 | } |
120 | 120 | ||
121 | offline_status_text[] = {{0x00, "NeverStarted"}, {0x02, "Completed"}, {0x04, "Suspended"}, {0x05, "Aborted"}, {0x06, "Failed"}, {0, 0}}; | 121 | static offline_status_text[] = {{0x00, "NeverStarted"}, {0x02, "Completed"}, {0x04, "Suspended"}, {0x05, "Aborted"}, {0x06, "Failed"}, {0, 0}}; |
122 | 122 | ||
123 | struct { | 123 | static struct { |
124 | __u8 value; | 124 | __u8 value; |
125 | char *text; | 125 | char *text; |
126 | } | 126 | } smart_command[] = {{SMART_ENABLE, "SMART_ENABLE"}, |
127 | |||
128 | smart_command[] = {{SMART_ENABLE, "SMART_ENABLE"}, | ||
129 | {SMART_DISABLE, "SMART_DISABLE"}, | 127 | {SMART_DISABLE, "SMART_DISABLE"}, |
130 | {SMART_IMMEDIATE_OFFLINE, "SMART_IMMEDIATE_OFFLINE"}, | 128 | {SMART_IMMEDIATE_OFFLINE, "SMART_IMMEDIATE_OFFLINE"}, |
131 | {SMART_AUTO_OFFLINE, "SMART_AUTO_OFFLINE"}}; | 129 | {SMART_AUTO_OFFLINE, "SMART_AUTO_OFFLINE"}}; |
@@ -138,14 +136,14 @@ enum SmartCommand { | |||
138 | SMART_CMD_AUTO_OFFLINE | 136 | SMART_CMD_AUTO_OFFLINE |
139 | }; | 137 | }; |
140 | 138 | ||
141 | char *get_offline_text(int); | 139 | static char *get_offline_text(int); |
142 | int smart_read_values(int, values_t *); | 140 | static int smart_read_values(int, values_t *); |
143 | int nagios(values_t *, thresholds_t *); | 141 | static int nagios(values_t *, thresholds_t *); |
144 | void print_value(value_t *, threshold_t *); | 142 | static void print_value(value_t *, threshold_t *); |
145 | void print_values(values_t *, thresholds_t *); | 143 | static void print_values(values_t *, thresholds_t *); |
146 | int smart_cmd_simple(int, enum SmartCommand, __u8, bool); | 144 | static int smart_cmd_simple(int, enum SmartCommand, __u8, bool); |
147 | int smart_read_thresholds(int, thresholds_t *); | 145 | static int smart_read_thresholds(int, thresholds_t *); |
148 | bool verbose = false; | 146 | static bool verbose = false; |
149 | 147 | ||
150 | int main(int argc, char *argv[]) { | 148 | int main(int argc, char *argv[]) { |
151 | char *device = NULL; | 149 | char *device = NULL; |