summaryrefslogtreecommitdiffstats
path: root/plugins/negate.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-01-31 11:27:22 +0000
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-01-31 11:27:22 +0000
commit184ce9f6a38f5ee3355fdb8a6e557c3dc7811482 (patch)
tree9129d107a71bd1140eaae454015e4023a147917d /plugins/negate.c
parent6c4468a728788676621d4c5948ae018fc9d7c917 (diff)
downloadmonitoring-plugins-184ce9f6a38f5ee3355fdb8a6e557c3dc7811482.tar.gz
Bump plugins/ to GPLv3 (non-plugind files)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1918 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/negate.c')
-rw-r--r--plugins/negate.c115
1 files changed, 20 insertions, 95 deletions
diff --git a/plugins/negate.c b/plugins/negate.c
index 7bfef95a..eccc404d 100644
--- a/plugins/negate.c
+++ b/plugins/negate.c
@@ -1,72 +1,36 @@
1/****************************************************************************** 1/*****************************************************************************
2* 2*
3* Nagios negate plugin 3* Nagios negate plugin
4* 4*
5* License: GPL 5* License: GPL
6* Copyright (c) 2002-2007 nagios-plugins team 6* Copyright (c) 2002-2007 Nagios Plugins Development Team
7* 7*
8* Last Modified: $Date$ 8* Last Modified: $Date$
9* 9*
10* Description: 10* Description:
11* 11*
12* This file contains the negate plugin 12* This file contains the negate plugin
13* 13*
14* Negates the status of a plugin (returns OK for CRITICAL, and vice-versa) 14* Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).
15* 15* Can also perform custom state switching.
16* License Information: 16*
17* 17*
18* This program is free software; you can redistribute it and/or modify 18* This program is free software: you can redistribute it and/or modify
19* it under the terms of the GNU General Public License as published by 19* it under the terms of the GNU General Public License as published by
20* the Free Software Foundation; either version 2 of the License, or 20* the Free Software Foundation, either version 3 of the License, or
21* (at your option) any later version. 21* (at your option) any later version.
22* 22*
23* This program is distributed in the hope that it will be useful, 23* This program is distributed in the hope that it will be useful,
24* but WITHOUT ANY WARRANTY; without even the implied warranty of 24* but WITHOUT ANY WARRANTY; without even the implied warranty of
25* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26* GNU General Public License for more details. 26* GNU General Public License for more details.
27* 27*
28* You should have received a copy of the GNU General Public License 28* You should have received a copy of the GNU General Public License
29* along with this program; if not, write to the Free Software 29* along with this program. If not, see <http://www.gnu.org/licenses/>.
30* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30*
31*
32* $Id$ 31* $Id$
33 32*
34@@-<article> 33*****************************************************************************/
35
36<sect1>
37<title>Quick Reference</title>
38<refentry>
39<refmeta><manvolnum>5<manvolnum></refmeta>
40<refnamdiv>
41<refname>&progname;</refname>
42<refpurpose>&SUMMARY;</refpurpose>
43</refnamdiv>
44</refentry>
45</sect1>
46
47<sect1>
48<title>FAQ</title>
49</sect1>
50
51<sect1>
52<title>Theory, Installation, and Operation</title>
53
54<sect2>
55<title>General Description</title>
56<para>
57&DESCRIPTION;
58</para>
59</sect2>
60
61<sect2>
62<title>Future Enhancements</title>
63<para>ToDo List</para>
64<itemizedlist>
65<listitem>Add option to do regex substitution in output text</listitem>
66</itemizedlist>
67</sect2>-@@
68
69******************************************************************************/
70 34
71const char *progname = "negate"; 35const char *progname = "negate";
72const char *revision = "$Revision$"; 36const char *revision = "$Revision$";
@@ -142,25 +106,6 @@ main (int argc, char **argv)
142 } 106 }
143} 107}
144 108
145/******************************************************************************
146@@-
147<sect2>
148<title>Functions</title>
149
150<sect3>
151<title>process_arguments</title>
152
153<para>This function parses the command line into the needed
154variables.</para>
155
156<para>Aside from the standard 'help' and 'version' options, there
157is a only a 'timeout' option.</para>
158
159</sect3>
160-@@
161******************************************************************************/
162
163
164 109
165/* process command-line arguments */ 110/* process command-line arguments */
166static const char ** 111static const char **
@@ -239,19 +184,6 @@ process_arguments (int argc, char **argv)
239} 184}
240 185
241 186
242/******************************************************************************
243@@-
244<sect3>
245<title>validate_arguments</title>
246
247<para>No validation is currently done.</para>
248
249</sect3>
250-@@
251******************************************************************************/
252
253
254
255int 187int
256validate_arguments (char **command_line) 188validate_arguments (char **command_line)
257{ 189{
@@ -262,13 +194,6 @@ validate_arguments (char **command_line)
262 usage4 (_("Require path to command")); 194 usage4 (_("Require path to command"));
263} 195}
264 196
265/******************************************************************************
266@@-
267</sect2>
268</sect1>
269</article>
270-@@
271******************************************************************************/
272 197
273int 198int
274translate_state (char *state_text) 199translate_state (char *state_text)