diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-20 00:55:43 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-20 00:55:43 +0200 |
commit | 8135f66739bf39a054218249bbf6e9ece21c69a3 (patch) | |
tree | 6029e013624cee74eb227f401a7001d702080256 | |
parent | 36a9b52caeae27e44e9f336e2701bda67a3959a2 (diff) | |
download | monitoring-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.
-rw-r--r-- | plugins/check_ide_smart.c | 16 |
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); | |||
46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
47 | #include <sys/ioctl.h> | 47 | #include <sys/ioctl.h> |
48 | #include <fcntl.h> | 48 | #include <fcntl.h> |
49 | #ifdef linux | 49 | #ifdef __linux__ |
50 | #include <linux/hdreg.h> | 50 | #include <linux/hdreg.h> |
51 | #include <linux/types.h> | 51 | #include <linux/types.h> |
52 | 52 | ||
53 | #define OPEN_MODE O_RDONLY | 53 | #define OPEN_MODE O_RDONLY |
54 | #endif /* linux */ | 54 | #endif /* __linux__ */ |
55 | #ifdef __NetBSD__ | 55 | #ifdef __NetBSD__ |
56 | #include <sys/device.h> | 56 | #include <sys/device.h> |
57 | #include <sys/param.h> | 57 | #include <sys/param.h> |
@@ -305,7 +305,7 @@ get_offline_text (int status) | |||
305 | int | 305 | int |
306 | smart_read_values (int fd, values_t * values) | 306 | smart_read_values (int fd, values_t * values) |
307 | { | 307 | { |
308 | #ifdef linux | 308 | #ifdef __linux__ |
309 | int e; | 309 | int e; |
310 | __u8 args[4 + 512]; | 310 | __u8 args[4 + 512]; |
311 | args[0] = WIN_SMART; | 311 | args[0] = WIN_SMART; |
@@ -318,7 +318,7 @@ smart_read_values (int fd, values_t * values) | |||
318 | return e; | 318 | return e; |
319 | } | 319 | } |
320 | memcpy (values, args + 4, 512); | 320 | memcpy (values, args + 4, 512); |
321 | #endif /* linux */ | 321 | #endif /* __linux__ */ |
322 | #ifdef __NetBSD__ | 322 | #ifdef __NetBSD__ |
323 | struct atareq req; | 323 | struct atareq req; |
324 | unsigned char inbuf[DEV_BSIZE]; | 324 | unsigned char inbuf[DEV_BSIZE]; |
@@ -490,7 +490,7 @@ int | |||
490 | smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error) | 490 | smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error) |
491 | { | 491 | { |
492 | int e = 0; | 492 | int e = 0; |
493 | #ifdef linux | 493 | #ifdef __linux__ |
494 | __u8 args[4]; | 494 | __u8 args[4]; |
495 | args[0] = WIN_SMART; | 495 | args[0] = WIN_SMART; |
496 | args[1] = val0; | 496 | args[1] = val0; |
@@ -502,7 +502,7 @@ smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error) | |||
502 | printf (_("CRITICAL - %s: %s\n"), smart_command[command].text, strerror (errno)); | 502 | printf (_("CRITICAL - %s: %s\n"), smart_command[command].text, strerror (errno)); |
503 | } | 503 | } |
504 | } | 504 | } |
505 | #endif /* linux */ | 505 | #endif /* __linux__ */ |
506 | #ifdef __NetBSD__ | 506 | #ifdef __NetBSD__ |
507 | struct atareq req; | 507 | struct atareq req; |
508 | 508 | ||
@@ -535,7 +535,7 @@ smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error) | |||
535 | int | 535 | int |
536 | smart_read_thresholds (int fd, thresholds_t * thresholds) | 536 | smart_read_thresholds (int fd, thresholds_t * thresholds) |
537 | { | 537 | { |
538 | #ifdef linux | 538 | #ifdef __linux__ |
539 | int e; | 539 | int e; |
540 | __u8 args[4 + 512]; | 540 | __u8 args[4 + 512]; |
541 | args[0] = WIN_SMART; | 541 | args[0] = WIN_SMART; |
@@ -548,7 +548,7 @@ smart_read_thresholds (int fd, thresholds_t * thresholds) | |||
548 | return e; | 548 | return e; |
549 | } | 549 | } |
550 | memcpy (thresholds, args + 4, 512); | 550 | memcpy (thresholds, args + 4, 512); |
551 | #endif /* linux */ | 551 | #endif /* __linux__ */ |
552 | #ifdef __NetBSD__ | 552 | #ifdef __NetBSD__ |
553 | struct atareq req; | 553 | struct atareq req; |
554 | unsigned char inbuf[DEV_BSIZE]; | 554 | unsigned char inbuf[DEV_BSIZE]; |