diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
commit | caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe (patch) | |
tree | 118fd80cc8ba27ef695a8e8ce409e5d70f4fa451 /plugins-root | |
parent | 16f53e0717b60660145388b0feb351628f606211 (diff) | |
download | monitoring-plugins-caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe.tar.gz |
Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_dhcp.c | 38 | ||||
-rw-r--r-- | plugins-root/check_icmp.c | 2 | ||||
-rw-r--r-- | plugins-root/pst3.c | 24 |
3 files changed, 32 insertions, 32 deletions
diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c index 5781f758..35874a93 100644 --- a/plugins-root/check_dhcp.c +++ b/plugins-root/check_dhcp.c | |||
@@ -79,8 +79,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
79 | 79 | ||
80 | #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__) | 80 | #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__) |
81 | 81 | ||
82 | #define INSAP 22 | 82 | #define INSAP 22 |
83 | #define OUTSAP 24 | 83 | #define OUTSAP 24 |
84 | 84 | ||
85 | #include <signal.h> | 85 | #include <signal.h> |
86 | #include <ctype.h> | 86 | #include <ctype.h> |
@@ -90,17 +90,17 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
90 | 90 | ||
91 | #define bcopy(source, destination, length) memcpy(destination, source, length) | 91 | #define bcopy(source, destination, length) memcpy(destination, source, length) |
92 | 92 | ||
93 | #define AREA_SZ 5000 /* buffer length in bytes */ | 93 | #define AREA_SZ 5000 /* buffer length in bytes */ |
94 | static u_long ctl_area[AREA_SZ]; | 94 | static u_long ctl_area[AREA_SZ]; |
95 | static u_long dat_area[AREA_SZ]; | 95 | static u_long dat_area[AREA_SZ]; |
96 | static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area}; | 96 | static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area}; |
97 | static struct strbuf dat = {AREA_SZ, 0, (char *)dat_area}; | 97 | static struct strbuf dat = {AREA_SZ, 0, (char *)dat_area}; |
98 | 98 | ||
99 | #define GOT_CTRL 1 | 99 | #define GOT_CTRL 1 |
100 | #define GOT_DATA 2 | 100 | #define GOT_DATA 2 |
101 | #define GOT_BOTH 3 | 101 | #define GOT_BOTH 3 |
102 | #define GOT_INTR 4 | 102 | #define GOT_INTR 4 |
103 | #define GOT_ERR 128 | 103 | #define GOT_ERR 128 |
104 | 104 | ||
105 | #define u_int8_t uint8_t | 105 | #define u_int8_t uint8_t |
106 | #define u_int16_t uint16_t | 106 | #define u_int16_t uint16_t |
@@ -222,7 +222,7 @@ dhcp_offer *dhcp_offer_list=NULL; | |||
222 | requested_server *requested_server_list=NULL; | 222 | requested_server *requested_server_list=NULL; |
223 | 223 | ||
224 | int valid_responses=0; /* number of valid DHCPOFFERs we received */ | 224 | int valid_responses=0; /* number of valid DHCPOFFERs we received */ |
225 | int requested_servers=0; | 225 | int requested_servers=0; |
226 | int requested_responses=0; | 226 | int requested_responses=0; |
227 | 227 | ||
228 | int request_specific_address=FALSE; | 228 | int request_specific_address=FALSE; |
@@ -382,7 +382,7 @@ int get_hardware_address(int sock,char *interface_name){ | |||
382 | unit = atoi(p) ; | 382 | unit = atoi(p) ; |
383 | *p = '\0' ; | 383 | *p = '\0' ; |
384 | strncat(dev, interface_name, 6) ; | 384 | strncat(dev, interface_name, 6) ; |
385 | } | 385 | } |
386 | else{ | 386 | else{ |
387 | printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name); | 387 | printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name); |
388 | exit(STATE_UNKNOWN); | 388 | exit(STATE_UNKNOWN); |
@@ -535,7 +535,7 @@ int send_dhcp_discover(int sock){ | |||
535 | /* send the DHCPDISCOVER packet out */ | 535 | /* send the DHCPDISCOVER packet out */ |
536 | send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast); | 536 | send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast); |
537 | 537 | ||
538 | if(verbose) | 538 | if(verbose) |
539 | printf("\n\n"); | 539 | printf("\n\n"); |
540 | 540 | ||
541 | return OK; | 541 | return OK; |
@@ -564,7 +564,7 @@ int get_dhcp_offer(int sock){ | |||
564 | if((current_time-start_time)>=dhcpoffer_timeout) | 564 | if((current_time-start_time)>=dhcpoffer_timeout) |
565 | break; | 565 | break; |
566 | 566 | ||
567 | if(verbose) | 567 | if(verbose) |
568 | printf("\n\n"); | 568 | printf("\n\n"); |
569 | 569 | ||
570 | bzero(&source,sizeof(source)); | 570 | bzero(&source,sizeof(source)); |
@@ -581,7 +581,7 @@ int get_dhcp_offer(int sock){ | |||
581 | continue; | 581 | continue; |
582 | } | 582 | } |
583 | else{ | 583 | else{ |
584 | if(verbose) | 584 | if(verbose) |
585 | printf(_("Result=OK\n")); | 585 | printf(_("Result=OK\n")); |
586 | 586 | ||
587 | responses++; | 587 | responses++; |
@@ -626,7 +626,7 @@ int get_dhcp_offer(int sock){ | |||
626 | printf("\n"); | 626 | printf("\n"); |
627 | 627 | ||
628 | if(result==ERROR){ | 628 | if(result==ERROR){ |
629 | if(verbose) | 629 | if(verbose) |
630 | printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n")); | 630 | printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n")); |
631 | 631 | ||
632 | continue; | 632 | continue; |
@@ -660,7 +660,7 @@ int send_dhcp_packet(void *buffer, int buffer_size, int sock, struct sockaddr_in | |||
660 | 660 | ||
661 | result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest)); | 661 | result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest)); |
662 | 662 | ||
663 | if(verbose) | 663 | if(verbose) |
664 | printf(_("send_dhcp_packet result: %d\n"),result); | 664 | printf(_("send_dhcp_packet result: %d\n"),result); |
665 | 665 | ||
666 | if(result<0) | 666 | if(result<0) |
@@ -853,7 +853,7 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ | |||
853 | /* get option length */ | 853 | /* get option length */ |
854 | option_length=offer_packet->options[x++]; | 854 | option_length=offer_packet->options[x++]; |
855 | 855 | ||
856 | if(verbose) | 856 | if(verbose) |
857 | printf("Option: %d (0x%02X)\n",option_type,option_length); | 857 | printf("Option: %d (0x%02X)\n",option_type,option_length); |
858 | 858 | ||
859 | /* get option data */ | 859 | /* get option data */ |
@@ -989,7 +989,7 @@ int get_results(void){ | |||
989 | if(verbose){ | 989 | if(verbose){ |
990 | printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address)); | 990 | printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address)); |
991 | printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address)); | 991 | printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address)); |
992 | if(temp_server->answered) | 992 | if(temp_server->answered) |
993 | printf(_(" (duplicate)")); | 993 | printf(_(" (duplicate)")); |
994 | printf(_("\n")); | 994 | printf(_("\n")); |
995 | } | 995 | } |
@@ -1090,7 +1090,7 @@ int call_getopt(int argc, char **argv){ | |||
1090 | 1090 | ||
1091 | int option_index = 0; | 1091 | int option_index = 0; |
1092 | static struct option long_options[] = | 1092 | static struct option long_options[] = |
1093 | { | 1093 | { |
1094 | {"serverip", required_argument,0,'s'}, | 1094 | {"serverip", required_argument,0,'s'}, |
1095 | {"requestedip", required_argument,0,'r'}, | 1095 | {"requestedip", required_argument,0,'r'}, |
1096 | {"timeout", required_argument,0,'t'}, | 1096 | {"timeout", required_argument,0,'t'}, |
@@ -1306,7 +1306,7 @@ static int dl_bind(int fd, int sap, u_char *addr){ | |||
1306 | 1306 | ||
1307 | /*********************************************************************** | 1307 | /*********************************************************************** |
1308 | * interface: | 1308 | * interface: |
1309 | * function mac_addr_dlpi - get the mac address of the interface with | 1309 | * function mac_addr_dlpi - get the mac address of the interface with |
1310 | * type dev (eg lnc, hme) and unit (0, 1 ..) | 1310 | * type dev (eg lnc, hme) and unit (0, 1 ..) |
1311 | * | 1311 | * |
1312 | * parameter: addr: an array of six bytes, has to be allocated by the caller | 1312 | * parameter: addr: an array of six bytes, has to be allocated by the caller |
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index ff6c73b3..cc3f3d59 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -1313,7 +1313,7 @@ print_help(void) | |||
1313 | printf (" %s",_("timeout value (seconds, currently ")); | 1313 | printf (" %s",_("timeout value (seconds, currently ")); |
1314 | printf ("%u)\n", timeout); | 1314 | printf ("%u)\n", timeout); |
1315 | printf (" %s\n", "-b"); | 1315 | printf (" %s\n", "-b"); |
1316 | printf (" %s\n", _("Number of icmp data bytes to send")); | 1316 | printf (" %s\n", _("Number of icmp data bytes to send")); |
1317 | printf (" %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN); | 1317 | printf (" %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN); |
1318 | printf (" %s\n", "-v"); | 1318 | printf (" %s\n", "-v"); |
1319 | printf (" %s\n", _("verbose")); | 1319 | printf (" %s\n", _("verbose")); |
diff --git a/plugins-root/pst3.c b/plugins-root/pst3.c index b275a6bc..85136569 100644 --- a/plugins-root/pst3.c +++ b/plugins-root/pst3.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Description: | 8 | * Description: |
9 | * | 9 | * |
10 | * This file contains the pst3 executable. This is a replacement ps command | 10 | * This file contains the pst3 executable. This is a replacement ps command |
11 | * for Solaris to get output which provides a long argument listing, which | 11 | * for Solaris to get output which provides a long argument listing, which |
12 | * is not possible with the standard ps command (due to truncation). /usr/ucb/ps | 12 | * is not possible with the standard ps command (due to truncation). /usr/ucb/ps |
13 | * also has issues where some fields run into each other. | 13 | * also has issues where some fields run into each other. |
14 | * | 14 | * |
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | * Originally written by R.W.Ingraham | 18 | * Originally written by R.W.Ingraham |
19 | * Rewritten by Duncan Ferguson (Altinity Ltd, June 2008) | 19 | * Rewritten by Duncan Ferguson (Altinity Ltd, June 2008) |
20 | * The rewrite was necessary as /dev/kmem is not available within | 20 | * The rewrite was necessary as /dev/kmem is not available within |
21 | * non-global zones on Solaris 10 | 21 | * non-global zones on Solaris 10 |
22 | * | 22 | * |
23 | * Details for rewrite came from | 23 | * Details for rewrite came from |
@@ -48,7 +48,7 @@ | |||
48 | #include <fcntl.h> | 48 | #include <fcntl.h> |
49 | #include <procfs.h> | 49 | #include <procfs.h> |
50 | #include <errno.h> | 50 | #include <errno.h> |
51 | #include <sys/types32.h> | 51 | #include <sys/types32.h> |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Constants | 54 | * Constants |
@@ -125,8 +125,8 @@ int main (int argc, char **argv) | |||
125 | char *procname; | 125 | char *procname; |
126 | char *ptr; | 126 | char *ptr; |
127 | int argslen; | 127 | int argslen; |
128 | uintptr_t args_addr;; | 128 | uintptr_t args_addr;; |
129 | uintptr_t *args_vecs;; | 129 | uintptr_t *args_vecs;; |
130 | int args_count; | 130 | int args_count; |
131 | 131 | ||
132 | if(proc->d_name[0] == '.') | 132 | if(proc->d_name[0] == '.') |
@@ -146,8 +146,8 @@ try_again: | |||
146 | close(ps_fd); | 146 | close(ps_fd); |
147 | close(as_fd); | 147 | close(as_fd); |
148 | if(err == EAGAIN) goto try_again; | 148 | if(err == EAGAIN) goto try_again; |
149 | if(err != ENOENT) | 149 | if(err != ENOENT) |
150 | fprintf(stderr, "%s: read() on %s: %s\n", szProg, | 150 | fprintf(stderr, "%s: read() on %s: %s\n", szProg, |
151 | ps_name, strerror(err)); | 151 | ps_name, strerror(err)); |
152 | continue; | 152 | continue; |
153 | } | 153 | } |
@@ -185,7 +185,7 @@ try_again: | |||
185 | ); | 185 | ); |
186 | free(procname); | 186 | free(procname); |
187 | 187 | ||
188 | /* | 188 | /* |
189 | * and now for the command line stuff | 189 | * and now for the command line stuff |
190 | */ | 190 | */ |
191 | 191 | ||
@@ -195,18 +195,18 @@ try_again: | |||
195 | 195 | ||
196 | if(psinfo.pr_dmodel == PR_MODEL_NATIVE) { | 196 | if(psinfo.pr_dmodel == PR_MODEL_NATIVE) { |
197 | /* this process matches target process */ | 197 | /* this process matches target process */ |
198 | pread(as_fd,args_vecs, args_count * sizeof(uintptr_t), | 198 | pread(as_fd,args_vecs, args_count * sizeof(uintptr_t), |
199 | args_addr); | 199 | args_addr); |
200 | } else { | 200 | } else { |
201 | /* this process is 64bit, target process is 32 bit*/ | 201 | /* this process is 64bit, target process is 32 bit*/ |
202 | caddr32_t *args_vecs32 = (caddr32_t *)args_vecs; | 202 | caddr32_t *args_vecs32 = (caddr32_t *)args_vecs; |
203 | pread(as_fd,args_vecs32,args_count * sizeof(caddr32_t), | 203 | pread(as_fd,args_vecs32,args_count * sizeof(caddr32_t), |
204 | args_addr); | 204 | args_addr); |
205 | for (i=args_count-1;i>=0;--i) | 205 | for (i=args_count-1;i>=0;--i) |
206 | args_vecs[i]=args_vecs32[i]; | 206 | args_vecs[i]=args_vecs32[i]; |
207 | } | 207 | } |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * now read in the args - if what we read in fills buffer | 210 | * now read in the args - if what we read in fills buffer |
211 | * resize buffer and reread that bit again | 211 | * resize buffer and reread that bit again |
212 | */ | 212 | */ |