summaryrefslogtreecommitdiffstats
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
commitd19edd4043c498626fe68308005947975ef0a697 (patch)
tree7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_disk.c
parent1d8128e328f714258b7fec0c62245e1d187e0439 (diff)
downloadmonitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz
standardize localization string
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r--plugins/check_disk.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index c823925..437bbbf 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -14,6 +14,8 @@
14 along with this program; if not, write to the Free Software 14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 16
17 $Id$
18
17*****************************************************************************/ 19*****************************************************************************/
18 20
19const char *progname = "check_disk"; 21const char *progname = "check_disk";
@@ -133,7 +135,7 @@ int display_mntp = FALSE;
133static struct mount_entry *mount_list; 135static struct mount_entry *mount_list;
134 136
135 137
136 138
137int 139int
138main (int argc, char **argv) 140main (int argc, char **argv)
139{ 141{
@@ -162,7 +164,7 @@ main (int argc, char **argv)
162 mount_list = read_filesystem_list (0); 164 mount_list = read_filesystem_list (0);
163 165
164 if (process_arguments (argc, argv) != OK) 166 if (process_arguments (argc, argv) != OK)
165 usage (_("Could not parse arguments\n")); 167 usage (_("check_disk: could not parse arguments\n"));
166 168
167 for (me = mount_list; me; me = me->me_next) { 169 for (me = mount_list; me; me = me->me_next) {
168 170
@@ -240,7 +242,6 @@ main (int argc, char **argv)
240 242
241 243
242 244
243
244/* process command-line arguments */ 245/* process command-line arguments */
245int 246int
246process_arguments (int argc, char **argv) 247process_arguments (int argc, char **argv)
@@ -437,8 +438,9 @@ process_arguments (int argc, char **argv)
437 print_help (); 438 print_help ();
438 exit (STATE_OK); 439 exit (STATE_OK);
439 case '?': /* help */ 440 case '?': /* help */
440 usage (_("Unknow argument\n")); 441 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
441 break; 442 print_usage ();
443 exit (STATE_UNKNOWN);
442 } 444 }
443 } 445 }
444 446
@@ -479,6 +481,7 @@ process_arguments (int argc, char **argv)
479} 481}
480 482
481 483
484
482void 485void
483print_path (const char *mypath) 486print_path (const char *mypath)
484{ 487{
@@ -490,6 +493,8 @@ print_path (const char *mypath)
490 return; 493 return;
491} 494}
492 495
496
497
493int 498int
494validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, char *mypath) 499validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, char *mypath)
495{ 500{
@@ -523,7 +528,6 @@ INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greate
523 528
524 529
525 530
526
527int 531int
528check_disk (double usp, double free_disk) 532check_disk (double usp, double free_disk)
529{ 533{
@@ -564,8 +568,6 @@ walk_name_list (struct name_list *list, const char *name)
564 568
565 569
566 570
567
568
569void 571void
570print_help (void) 572print_help (void)
571{ 573{
@@ -631,7 +633,6 @@ and generates an alert if free space is less than one of the threshold values.")
631 633
632 634
633 635
634
635void 636void
636print_usage (void) 637print_usage (void)
637{ 638{