aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_disk.c
diff options
context:
space:
mode:
authorGravatar Benoit Mortier <opensides@users.sourceforge.net> 2004-12-01 23:54:51 +0000
committerGravatar Benoit Mortier <opensides@users.sourceforge.net> 2004-12-01 23:54:51 +0000
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 c8239250..437bbbf2 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -14,6 +14,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ $Id$
+
*****************************************************************************/
const char *progname = "check_disk";
@@ -133,7 +135,7 @@ int display_mntp = FALSE;
static struct mount_entry *mount_list;
-
+
int
main (int argc, char **argv)
{
@@ -162,7 +164,7 @@ main (int argc, char **argv)
mount_list = read_filesystem_list (0);
if (process_arguments (argc, argv) != OK)
- usage (_("Could not parse arguments\n"));
+ usage (_("check_disk: could not parse arguments\n"));
for (me = mount_list; me; me = me->me_next) {
@@ -240,7 +242,6 @@ main (int argc, char **argv)
-
/* process command-line arguments */
int
process_arguments (int argc, char **argv)
@@ -437,8 +438,9 @@ process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case '?': /* help */
- usage (_("Unknow argument\n"));
- break;
+ printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
+ print_usage ();
+ exit (STATE_UNKNOWN);
}
}
@@ -479,6 +481,7 @@ process_arguments (int argc, char **argv)
}
+
void
print_path (const char *mypath)
{
@@ -490,6 +493,8 @@ print_path (const char *mypath)
return;
}
+
+
int
validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, char *mypath)
{
@@ -523,7 +528,6 @@ INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greate
-
int
check_disk (double usp, double free_disk)
{
@@ -564,8 +568,6 @@ walk_name_list (struct name_list *list, const char *name)
-
-
void
print_help (void)
{
@@ -631,7 +633,6 @@ and generates an alert if free space is less than one of the threshold values.")
-
void
print_usage (void)
{