aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ide_smart.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-20 00:55:43 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-20 00:55:43 +0200
commit8135f66739bf39a054218249bbf6e9ece21c69a3 (patch)
tree6029e013624cee74eb227f401a7001d702080256 /plugins/check_ide_smart.c
parent36a9b52caeae27e44e9f336e2701bda67a3959a2 (diff)
downloadmonitoring-plugins-8135f66739bf39a054218249bbf6e9ece21c69a3.tar.gz
check_ide_smart: "__linux__" instead of "linux"
C compilers in standards compliance mode will not define "linux", as it doesn't begin with an underscore.
Diffstat (limited to 'plugins/check_ide_smart.c')
-rw-r--r--plugins/check_ide_smart.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c
index e1a75ce3..ee6bf7bd 100644
--- a/plugins/check_ide_smart.c
+++ b/plugins/check_ide_smart.c
@@ -46,12 +46,12 @@ void print_usage (void);
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
-#ifdef linux
+#ifdef __linux__
#include <linux/hdreg.h>
#include <linux/types.h>
#define OPEN_MODE O_RDONLY
-#endif /* linux */
+#endif /* __linux__ */
#ifdef __NetBSD__
#include <sys/device.h>
#include <sys/param.h>
@@ -305,7 +305,7 @@ get_offline_text (int status)
int
smart_read_values (int fd, values_t * values)
{
-#ifdef linux
+#ifdef __linux__
int e;
__u8 args[4 + 512];
args[0] = WIN_SMART;
@@ -318,7 +318,7 @@ smart_read_values (int fd, values_t * values)
return e;
}
memcpy (values, args + 4, 512);
-#endif /* linux */
+#endif /* __linux__ */
#ifdef __NetBSD__
struct atareq req;
unsigned char inbuf[DEV_BSIZE];
@@ -490,7 +490,7 @@ int
smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error)
{
int e = 0;
-#ifdef linux
+#ifdef __linux__
__u8 args[4];
args[0] = WIN_SMART;
args[1] = val0;
@@ -502,7 +502,7 @@ smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error)
printf (_("CRITICAL - %s: %s\n"), smart_command[command].text, strerror (errno));
}
}
-#endif /* linux */
+#endif /* __linux__ */
#ifdef __NetBSD__
struct atareq req;
@@ -535,7 +535,7 @@ smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error)
int
smart_read_thresholds (int fd, thresholds_t * thresholds)
{
-#ifdef linux
+#ifdef __linux__
int e;
__u8 args[4 + 512];
args[0] = WIN_SMART;
@@ -548,7 +548,7 @@ smart_read_thresholds (int fd, thresholds_t * thresholds)
return e;
}
memcpy (thresholds, args + 4, 512);
-#endif /* linux */
+#endif /* __linux__ */
#ifdef __NetBSD__
struct atareq req;
unsigned char inbuf[DEV_BSIZE];