summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 03:51:37 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 03:51:37 +0100
commit5c6d79dac31b55d78fcbb10c48ab357574307bc0 (patch)
tree043498b9270c8b76166c792900dd55ab8fa44086
parentc16bc4024caed74a3ceb9168c7e50ce3ad09dacb (diff)
downloadmonitoring-plugins-5c6d79dac31b55d78fcbb10c48ab357574307bc0.tar.gz
check_ide_smart: do not export local symbols
-rw-r--r--plugins/check_ide_smart.c26
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
43void print_help(void); 43static void print_help(void);
44void print_usage(void); 44void 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
121offline_status_text[] = {{0x00, "NeverStarted"}, {0x02, "Completed"}, {0x04, "Suspended"}, {0x05, "Aborted"}, {0x06, "Failed"}, {0, 0}}; 121static offline_status_text[] = {{0x00, "NeverStarted"}, {0x02, "Completed"}, {0x04, "Suspended"}, {0x05, "Aborted"}, {0x06, "Failed"}, {0, 0}};
122 122
123struct { 123static struct {
124 __u8 value; 124 __u8 value;
125 char *text; 125 char *text;
126} 126} smart_command[] = {{SMART_ENABLE, "SMART_ENABLE"},
127
128smart_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
141char *get_offline_text(int); 139static char *get_offline_text(int);
142int smart_read_values(int, values_t *); 140static int smart_read_values(int, values_t *);
143int nagios(values_t *, thresholds_t *); 141static int nagios(values_t *, thresholds_t *);
144void print_value(value_t *, threshold_t *); 142static void print_value(value_t *, threshold_t *);
145void print_values(values_t *, thresholds_t *); 143static void print_values(values_t *, thresholds_t *);
146int smart_cmd_simple(int, enum SmartCommand, __u8, bool); 144static int smart_cmd_simple(int, enum SmartCommand, __u8, bool);
147int smart_read_thresholds(int, thresholds_t *); 145static int smart_read_thresholds(int, thresholds_t *);
148bool verbose = false; 146static bool verbose = false;
149 147
150int main(int argc, char *argv[]) { 148int main(int argc, char *argv[]) {
151 char *device = NULL; 149 char *device = NULL;