diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
commit | d19edd4043c498626fe68308005947975ef0a697 (patch) | |
tree | 7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_disk.c | |
parent | 1d8128e328f714258b7fec0c62245e1d187e0439 (diff) | |
download | monitoring-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.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index c8239250..437bbbf2 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 | ||
19 | const char *progname = "check_disk"; | 21 | const char *progname = "check_disk"; |
@@ -133,7 +135,7 @@ int display_mntp = FALSE; | |||
133 | static struct mount_entry *mount_list; | 135 | static struct mount_entry *mount_list; |
134 | 136 | ||
135 | 137 | ||
136 | 138 | ||
137 | int | 139 | int |
138 | main (int argc, char **argv) | 140 | main (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 */ |
245 | int | 246 | int |
246 | process_arguments (int argc, char **argv) | 247 | process_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 | |||
482 | void | 485 | void |
483 | print_path (const char *mypath) | 486 | print_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 | |||
493 | int | 498 | int |
494 | validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, char *mypath) | 499 | validate_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 | |||
527 | int | 531 | int |
528 | check_disk (double usp, double free_disk) | 532 | check_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 | |||
569 | void | 571 | void |
570 | print_help (void) | 572 | print_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 | |||
635 | void | 636 | void |
636 | print_usage (void) | 637 | print_usage (void) |
637 | { | 638 | { |