From fbf1e60f477460205c2002bb34b87f9e1e3b0faf Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Fri, 12 Nov 2004 00:49:51 +0000 Subject: Update to using coreutils 5.2.1 libraries and snprintf.c from samba 3.0.8 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@895 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/lib/Makefile.am b/lib/Makefile.am index 7b07f55..2e9aeee 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,7 +2,8 @@ noinst_LIBRARIES = libnagiosplug.a -libnagiosplug_a_SOURCES = getopt.c getopt1.c snprintf.c fsusage.c mountlist.c xmalloc.c +libnagiosplug_a_SOURCES = getopt.c getopt1.c fsusage.c snprintf.c mountlist.c \ + xmalloc.c xstrdup.c exitfail.c libnagiosplug_a_LIBADD = @LIBOBJS@ libnagiosplug_a_DEPENDENCIES = $(libnagiosplug_a_LIBADD) @@ -12,6 +13,7 @@ EXTRA_DIST = ulonglong.m4 codeset.m4 getloadavg.m4 gettext.m4 glibc21.m4 iconv.m inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \ lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 afs.m4 \ fstypename.m4 fsusage.m4 ls-mntd-fs.m4 getopt.h gettext.h fsusage.h mountlist.h\ - error.m4 error.h error.c getloadavg.c xalloc.h unlocked-io.h malloc.c realloc.c strtod.c + error.m4 error.h error.c getloadavg.c xalloc.h unlocked-io.h unlocked-io.m4 malloc.c \ + onceonly.m4 realloc.c strtod.c exitfail.h full-read.h xstrdup.c xalloc.m4 exit.h INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl diff --git a/lib/error.c b/lib/error.c index 2296124..1149235 100644 --- a/lib/error.c +++ b/lib/error.c @@ -1,5 +1,7 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) @@ -20,7 +22,12 @@ # include #endif +#include "error.h" + +#include #include +#include +#include #ifdef _LIBC # include @@ -33,28 +40,6 @@ # define mbsrtowcs __mbsrtowcs #endif -#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC -# if __STDC__ -# include -# define VA_START(args, lastarg) va_start(args, lastarg) -# else -# include -# define VA_START(args, lastarg) va_start(args) -# endif -#else -# define va_alist a1, a2, a3, a4, a5, a6, a7, a8 -# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; -#endif - -#if STDC_HEADERS || _LIBC -# include -# include -#else -void exit (); -#endif - -#include "error.h" - #if !_LIBC # include "unlocked-io.h" #endif @@ -66,11 +51,7 @@ void exit (); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ -void (*error_print_progname) ( -#if __STDC__ - 0 - void -#endif - ); +void (*error_print_progname) (void); /* This variable is incremented each time `error' is called. */ unsigned int error_message_count; @@ -98,6 +79,8 @@ extern void __error_at_line (int status, int errnum, const char *file_name, # undef putc # define putc(c, fp) INTUSE(_IO_putc) (c, fp) +# include + #else /* not _LIBC */ # if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P @@ -107,34 +90,17 @@ extern void __error_at_line (int status, int errnum, const char *file_name, char *strerror_r (); # endif +# ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +# endif + /* The calling program should define program_name and set it to the name of the executing program. */ -extern char *progname; +extern char *program_name; # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# else -# if HAVE_STRERROR -# ifndef HAVE_DECL_STRERROR -"this configure-time declaration test was not run" -# endif -# if !HAVE_DECL_STRERROR -char *strerror (); -# endif -# else -static char * -private_strerror (int errnum) -{ - extern char *sys_errlist[]; - extern int sys_nerr; - - if (errnum > 0 && errnum <= sys_nerr) - return _(sys_errlist[errnum]); - return _("Unknown system error"); -} -# define strerror private_strerror -# endif /* HAVE_STRERROR */ -# endif /* HAVE_STRERROR_R || defined strerror_r */ +# endif #endif /* not _LIBC */ static void @@ -172,93 +138,70 @@ print_errno_message (int errnum) fprintf (stderr, ": %s", s); } -#ifdef VA_START static void error_tail (int status, int errnum, const char *message, va_list args) { -# if HAVE_VPRINTF || _LIBC -# if _LIBC +#if _LIBC if (_IO_fwide (stderr, 0) > 0) { -# define ALLOCA_LIMIT 2000 +# define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; - wchar_t *wmessage = NULL; - mbstate_t st; - size_t res; - const char *tmp; - - do + const wchar_t *wmessage = L"out of memory"; + wchar_t *wbuf = (len < ALLOCA_LIMIT + ? alloca (len * sizeof *wbuf) + : len <= SIZE_MAX / sizeof *wbuf + ? malloc (len * sizeof *wbuf) + : NULL); + + if (wbuf) { - if (len < ALLOCA_LIMIT) - wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); - else - { - if (wmessage != NULL && len / 2 < ALLOCA_LIMIT) - wmessage = NULL; - - wmessage = (wchar_t *) realloc (wmessage, - len * sizeof (wchar_t)); - - if (wmessage == NULL) - { - fputws_unlocked (L"out of memory\n", stderr); - return; - } - } - + size_t res; + mbstate_t st; + const char *tmp = message; memset (&st, '\0', sizeof (st)); - tmp =message; + res = mbsrtowcs (wbuf, &tmp, len, &st); + wmessage = res == (size_t) -1 ? L"???" : wbuf; } - while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len); - - if (res == (size_t) -1) - /* The string cannot be converted. */ - wmessage = (wchar_t *) L"???"; __vfwprintf (stderr, wmessage, args); + if (! (len < ALLOCA_LIMIT)) + free (wbuf); } else -# endif +#endif vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif va_end (args); ++error_message_count; if (errnum) print_errno_message (errnum); -# if _LIBC +#if _LIBC if (_IO_fwide (stderr, 0) > 0) putwc (L'\n', stderr); else -# endif +#endif putc ('\n', stderr); fflush (stderr); if (status) exit (status); } -#endif /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ -/* VARARGS */ void -#if defined VA_START && __STDC__ error (int status, int errnum, const char *message, ...) -#else -error (status, errnum, message, va_alist) - int status; - int errnum; - char *message; - va_dcl -#endif { -#ifdef VA_START va_list args; + +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); #endif fflush (stdout); @@ -271,29 +214,20 @@ error (status, errnum, message, va_alist) { #if _LIBC if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s: ", progname); + __fwprintf (stderr, L"%s: ", program_name); else #endif - fprintf (stderr, "%s: ", progname); + fprintf (stderr, "%s: ", program_name); } -#ifdef VA_START - VA_START (args, message); + va_start (args, message); error_tail (status, errnum, message, args); -#else - fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); - - ++error_message_count; - if (errnum) - print_errno_message (errnum); - putc ('\n', stderr); - fflush (stderr); - if (status) - exit (status); -#endif #ifdef _LIBC _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif #endif } @@ -302,22 +236,10 @@ error (status, errnum, message, va_alist) int error_one_per_line; void -#if defined VA_START && __STDC__ error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) -#else -error_at_line (status, errnum, file_name, line_number, message, va_alist) - int status; - int errnum; - const char *file_name; - unsigned int line_number; - char *message; - va_dcl -#endif { -#ifdef VA_START va_list args; -#endif if (error_one_per_line) { @@ -334,6 +256,14 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) old_line_number = line_number; } +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); +#endif + fflush (stdout); #ifdef _LIBC _IO_flockfile (stderr); @@ -344,10 +274,10 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) { #if _LIBC if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s: ", progname); + __fwprintf (stderr, L"%s: ", program_name); else #endif - fprintf (stderr, "%s:", progname); + fprintf (stderr, "%s:", program_name); } if (file_name != NULL) @@ -360,23 +290,14 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist) fprintf (stderr, "%s:%d: ", file_name, line_number); } -#ifdef VA_START - VA_START (args, message); + va_start (args, message); error_tail (status, errnum, message, args); -#else - fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); - - ++error_message_count; - if (errnum) - print_errno_message (errnum); - putc ('\n', stderr); - fflush (stderr); - if (status) - exit (status); -#endif #ifdef _LIBC _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif #endif } diff --git a/lib/error.h b/lib/error.h index 177b2dc..8ed6359 100644 --- a/lib/error.h +++ b/lib/error.h @@ -1,24 +1,20 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _ERROR_H #define _ERROR_H 1 @@ -40,17 +36,15 @@ extern "C" { #endif -#if defined (__STDC__) && __STDC__ - /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ -extern void error (int status, int errnum, const char *format, ...) +extern void error (int __status, int __errnum, const char *__format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); -extern void error_at_line (int status, int errnum, const char *fname, - unsigned int lineno, const char *format, ...) +extern void error_at_line (int __status, int __errnum, const char *__fname, + unsigned int __lineno, const char *__format, ...) __attribute__ ((__format__ (__printf__, 5, 6))); /* If NULL, error will flush stdout, then print on stderr the program @@ -58,12 +52,6 @@ extern void error_at_line (int status, int errnum, const char *fname, function without parameters instead. */ extern void (*error_print_progname) (void); -#else -void error (); -void error_at_line (); -extern void (*error_print_progname) (); -#endif - /* This variable is incremented each time `error' is called. */ extern unsigned int error_message_count; diff --git a/lib/error.m4 b/lib/error.m4 index 717725d..0bc2e68 100644 --- a/lib/error.m4 +++ b/lib/error.m4 @@ -1,14 +1,15 @@ -#serial 5 +#serial 9 -dnl FIXME: put these prerequisite-only *.m4 files in a separate -dnl directory -- otherwise, they'll conflict with existing files. +AC_DEFUN([gl_ERROR], +[ + AC_FUNC_ERROR_AT_LINE + dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). + jm_PREREQ_ERROR +]) -dnl These are the prerequisite macros for GNU's error.c file. +# Prerequisites of lib/error.c. AC_DEFUN([jm_PREREQ_ERROR], [ - AC_CHECK_FUNCS(strerror vprintf doprnt) - AC_CHECK_DECLS([strerror]) - AC_CHECK_HEADERS([libintl.h]) - AC_FUNC_STRERROR_R - AC_HEADER_STDC + AC_REQUIRE([AC_FUNC_STRERROR_R]) + : ]) diff --git a/lib/exit.h b/lib/exit.h new file mode 100644 index 0000000..4e8d465 --- /dev/null +++ b/lib/exit.h @@ -0,0 +1,32 @@ +/* exit() function. + Copyright (C) 1995, 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _EXIT_H +#define _EXIT_H + +/* Get exit() declaration. */ +#include + +/* Some systems do not define EXIT_*, even with STDC_HEADERS. */ +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + +#endif /* _EXIT_H */ diff --git a/lib/exitfail.c b/lib/exitfail.c new file mode 100644 index 0000000..2ae5f69 --- /dev/null +++ b/lib/exitfail.c @@ -0,0 +1,27 @@ +/* Failure exit status + + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include "exitfail.h" +#include "exit.h" + +int volatile exit_failure = EXIT_FAILURE; diff --git a/lib/exitfail.h b/lib/exitfail.h new file mode 100644 index 0000000..cf5ab71 --- /dev/null +++ b/lib/exitfail.h @@ -0,0 +1,20 @@ +/* Failure exit status + + Copyright (C) 2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +extern int volatile exit_failure; diff --git a/lib/fsusage.c b/lib/fsusage.c index 7339c80..d926029 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -1,5 +1,7 @@ /* fsusage.c -- return space usage of mounted filesystems - Copyright (C) 1991, 1992, 1996, 1998, 1999 Free Software Foundation, Inc. + + Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003 Free + Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,23 +17,26 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "config.h" +#if HAVE_CONFIG_H +# include +#endif #if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif +#ifndef UINTMAX_MAX +# define UINTMAX_MAX ((uintmax_t) -1) +#endif + #include #include #include "fsusage.h" -#if HAVE_LIMITS_H -# include -#endif -#ifndef CHAR_BIT -# define CHAR_BIT 8 -#endif - -int statfs (); +#include #if HAVE_SYS_PARAM_H # include @@ -49,7 +54,7 @@ int statfs (); # include #endif -#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) +#if defined HAVE_SYS_FILSYS_H && !defined _CRAY # include /* SVR2 */ #endif @@ -70,11 +75,18 @@ int statfs (); int statvfs (); #endif +#include "full-read.h" + /* Many space usage primitives use all 1 bits to denote a value that is not applicable or unknown. Propagate this information by returning - a uintmax_t value that is all 1 bits if the argument is all 1 bits, - even if the argument is unsigned and smaller than uintmax_t. */ -#define PROPAGATE_ALL_ONES(x) ((x) == -1 ? (uintmax_t) -1 : (uintmax_t) (x)) + a uintmax_t value that is all 1 bits if X is all 1 bits, even if X + is unsigned and narrower than uintmax_t. */ +#define PROPAGATE_ALL_ONES(x) \ + ((sizeof (x) < sizeof (uintmax_t) \ + && (~ (x) == (sizeof (x) < sizeof (int) \ + ? - (1 << (sizeof (x) * CHAR_BIT)) \ + : 0))) \ + ? UINTMAX_MAX : (x)) /* Extract the top bit of X as an uintmax_t value. */ #define EXTRACT_TOP_BIT(x) ((x) \ @@ -89,8 +101,6 @@ int statvfs (); otherwise, use PROPAGATE_ALL_ONES. */ #define PROPAGATE_TOP_BIT(x) ((x) | ~ (EXTRACT_TOP_BIT (x) - 1)) -int safe_read (); - /* Fill in the fields of FSP with information about space usage for the filesystem on which PATH resides. DISK is the device on which PATH is mounted, for space-getting @@ -147,7 +157,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) if (fd < 0) return -1; lseek (fd, (off_t) SUPERBOFF, 0); - if (safe_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd) + if (full_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd) { close (fd); return -1; @@ -160,7 +170,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.s_tfree); fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.s_tfree) != 0; fsp->fsu_files = (fsd.s_isize == -1 - ? (uintmax_t) -1 + ? UINTMAX_MAX : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1)); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode); @@ -217,7 +227,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) /* Empirically, the block counts on most SVR3 and SVR3-derived systems seem to always be in terms of 512-byte blocks, no matter what value f_bsize has. */ -# if _AIX || defined(_CRAY) +# if _AIX || defined _CRAY fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize); # else fsp->fsu_blocksize = 512; @@ -233,12 +243,13 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) return -1; /* f_frsize isn't guaranteed to be supported. */ - fsp->fsu_blocksize = - PROPAGATE_ALL_ONES (fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize); + fsp->fsu_blocksize = (fsd.f_frsize + ? PROPAGATE_ALL_ONES (fsd.f_frsize) + : PROPAGATE_ALL_ONES (fsd.f_bsize)); #endif /* STAT_STATVFS */ -#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS) +#if !defined STAT_STATFS2_FS_DATA && !defined STAT_READ_FILSYS /* !Ultrix && !SVR2 */ fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.f_blocks); @@ -253,7 +264,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp) return 0; } -#if defined(_AIX) && defined(_I386) +#if defined _AIX && defined _I386 /* AIX PS/2 does not supply statfs. */ int diff --git a/lib/fsusage.h b/lib/fsusage.h index e0c0db5..e2cbbf1 100644 --- a/lib/fsusage.h +++ b/lib/fsusage.h @@ -1,5 +1,6 @@ /* fsusage.h -- declarations for filesystem space usage info - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. + + Copyright (C) 1991, 1992, 1997, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,15 +32,6 @@ struct fs_usage uintmax_t fsu_ffree; /* Free file nodes. */ }; -# ifndef PARAMS -# if defined PROTOTYPES || (defined __STDC__ && __STDC__) -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -# endif - -int get_fs_usage PARAMS ((const char *path, const char *disk, - struct fs_usage *fsp)); +int get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp); #endif diff --git a/lib/fsusage.m4 b/lib/fsusage.m4 index 85d0fc8..a0ab1e1 100644 --- a/lib/fsusage.m4 +++ b/lib/fsusage.m4 @@ -1,7 +1,18 @@ -#serial 9 +#serial 11 # From fileutils/configure.in +AC_DEFUN([gl_FSUSAGE], +[ + AC_CHECK_HEADERS_ONCE(sys/param.h) + AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs_types.h) + jm_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no]) + if test $gl_cv_fs_space = yes; then + AC_LIBOBJ(fsusage) + gl_PREREQ_FSUSAGE_EXTRA + fi +]) + # Try to determine how a program can obtain filesystem usage information. # If successful, define the appropriate symbol (see fsusage.c) and # execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND. @@ -193,7 +204,43 @@ if test $ac_fsusage_space = no; then ac_fsusage_space=yes) fi -dnl AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) -if test $ac_fsusage_space = yes ; then [$1] ; else [$2] ; fi +AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) ]) + + +# Check for SunOS statfs brokenness wrt partitions 2GB and larger. +# If exists and struct statfs has a member named f_spare, +# enable the work-around code in fsusage.c. +AC_DEFUN([jm_STATFS_TRUNCATES], +[ + AC_MSG_CHECKING([for statfs that truncates block counts]) + AC_CACHE_VAL(fu_cv_sys_truncating_statfs, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#if !defined(sun) && !defined(__sun) +choke -- this is a workaround for a Sun-specific problem +#endif +#include +#include ]], + [[struct statfs t; long c = *(t.f_spare);]])], + [fu_cv_sys_truncating_statfs=yes], + [fu_cv_sys_truncating_statfs=no])]) + if test $fu_cv_sys_truncating_statfs = yes; then + AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1, + [Define if the block counts reported by statfs may be truncated to 2GB + and the correct values may be stored in the f_spare array. + (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. + SunOS 4.1.1 seems not to be affected.)]) + fi + AC_MSG_RESULT($fu_cv_sys_truncating_statfs) +]) + + +# Prerequisites of lib/fsusage.c not done by jm_FILE_SYSTEM_USAGE. +AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], +[ + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) + AC_CHECK_HEADERS_ONCE(fcntl.h) + AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) + jm_STATFS_TRUNCATES +]) diff --git a/lib/full-read.h b/lib/full-read.h new file mode 100644 index 0000000..71f19a3 --- /dev/null +++ b/lib/full-read.h @@ -0,0 +1,24 @@ +/* An interface to read() that reads all it is asked to read. + + Copyright (C) 2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, read to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include + +/* Read COUNT bytes at BUF to descriptor FD, retrying if interrupted + or if partial reads occur. Return the number of bytes successfully + read, setting errno if that is less than COUNT. errno = 0 means EOF. */ +extern size_t full_read (int fd, void *buf, size_t count); diff --git a/lib/getloadavg.c b/lib/getloadavg.c index e9c4c08..c6b6fee 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c @@ -1,6 +1,10 @@ /* Get the system load averages. - Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997 - Free Software Foundation, Inc. + + Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994, + 1995, 1997, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. + + NOTE: The canonical source of this file is maintained with gnulib. + Bugs can be reported to bug-gnulib@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,12 +39,17 @@ LOAD_AVE_TYPE Type of the load average array in the kernel. Must be defined unless one of apollo, DGUX, NeXT, or UMAX is defined; + or we have libkstat; otherwise, no load average is available. + HAVE_NLIST_H nlist.h is available. NLIST_STRUCT defaults + to this. NLIST_STRUCT Include nlist.h, not a.out.h, and the nlist n_name element is a pointer, not an array. - NLIST_NAME_UNION struct nlist has an n_un member, not n_name. + HAVE_STRUCT_NLIST_N_UN_N_NAME `n_un.n_name' is member of `struct nlist'. LINUX_LDAV_FILE [__linux__]: File containing load averages. + HAVE_LOCALE_H locale.h is available. + HAVE_SETLOCALE The `setlocale' function is available. Specific system predefines this file uses, aside from setting default values if not emacs: @@ -62,7 +71,7 @@ VMS WINDOWS32 No-op for Windows95/NT. __linux__ Linux: assumes /proc filesystem mounted. - Support from Michael K. Johnson. + Support from Michael K. Johnson. __NetBSD__ NetBSD: assumes /kern filesystem mounted. In addition, to avoid nesting many #ifdefs, we internally set @@ -81,7 +90,7 @@ /* Both the Emacs and non-Emacs sections want this. Some configuration files' definitions for the LOAD_AVE_CVT macro (like sparc.h's) use macros like FSCALE, defined here. */ -#ifdef unix +#if defined (unix) || defined (__unix) # include #endif @@ -98,13 +107,15 @@ extern int errno; #endif -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H # include #endif -#if !HAVE_SETLOCALE +#ifndef HAVE_SETLOCALE # define setlocale(Category, Locale) /* empty */ #endif +#include "cloexec.h" + #ifndef HAVE_GETLOADAVG /* The existing Emacs configuration files define a macro called @@ -117,7 +128,7 @@ extern int errno; LOAD_AVE_CVT, but future machine config files should just define LDAV_CVT directly. */ -# if !defined(LDAV_CVT) && defined(LOAD_AVE_CVT) +# if !defined (LDAV_CVT) && defined (LOAD_AVE_CVT) # define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) # endif @@ -137,6 +148,12 @@ extern int errno; # undef FSCALE # endif +/* Same issues as for NeXT apply to the HURD-based GNU system. */ +# ifdef __GNU__ +# undef BSD +# undef FSCALE +# endif /* __GNU__ */ + /* Set values that are different from the defaults, which are set a little farther down with #ifndef. */ @@ -155,11 +172,11 @@ extern int errno; # define sun # endif -# if defined(hp300) && !defined(hpux) +# if defined (hp300) && !defined (hpux) # define MORE_BSD # endif -# if defined(ultrix) && defined(mips) +# if defined (ultrix) && defined (mips) # define decstation # endif @@ -167,7 +184,7 @@ extern int errno; # define SVR4 # endif -# if (defined(sun) && defined(SVR4)) || defined (SOLARIS2) +# if (defined (sun) && defined (SVR4)) || defined (SOLARIS2) # define SUNOS_5 # endif @@ -239,7 +256,7 @@ extern int errno; # define LOAD_AVE_TYPE long # endif -# if defined(alliant) && defined(i860) /* Alliant FX/2800 */ +# if defined (alliant) && defined (i860) /* Alliant FX/2800 */ # define LOAD_AVE_TYPE long # endif @@ -263,7 +280,7 @@ extern int errno; # define FSCALE 1024.0 # endif -# if defined(alliant) && defined(i860) /* Alliant FX/2800 */ +# if defined (alliant) && defined (i860) /* Alliant FX/2800 */ /* defines an incorrect value for FSCALE on an Alliant FX/2800 Concentrix 2.2, according to ghazi@noc.rutgers.edu. */ # undef FSCALE @@ -279,7 +296,7 @@ extern int errno; # define FSCALE 2048.0 # endif -# if defined(MIPS) || defined(SVR4) || defined(decstation) +# if defined (MIPS) || defined (SVR4) || defined (decstation) # define FSCALE 256 # endif @@ -314,69 +331,7 @@ extern int errno; # endif # endif -/* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */ -# ifndef NLIST_STRUCT - -# ifdef MORE_BSD -# define NLIST_STRUCT -# endif - -# ifdef sun -# define NLIST_STRUCT -# endif - -# ifdef decstation -# define NLIST_STRUCT -# endif - -# ifdef hpux -# define NLIST_STRUCT -# endif - -# if defined (_SEQUENT_) || defined (sequent) -# define NLIST_STRUCT -# endif - -# ifdef sgi -# define NLIST_STRUCT -# endif - -# ifdef SVR4 -# define NLIST_STRUCT -# endif - -# ifdef sony_news -# define NLIST_STRUCT -# endif - -# ifdef OSF_ALPHA -# define NLIST_STRUCT -# endif - -# if defined (ardent) && defined (titan) -# define NLIST_STRUCT -# endif - -# ifdef tek4300 -# define NLIST_STRUCT -# endif - -# ifdef butterfly -# define NLIST_STRUCT -# endif - -# if defined(alliant) && defined(i860) /* Alliant FX/2800 */ -# define NLIST_STRUCT -# endif - -# ifdef _AIX -# define NLIST_STRUCT -# endif - -# endif /* defined (NLIST_STRUCT) */ - - -# if defined(sgi) || (defined(mips) && !defined(BSD)) +# if defined (sgi) || (defined (mips) && !defined (BSD)) # define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31)) # endif @@ -389,7 +344,7 @@ extern int errno; # define KERNEL_FILE "/hp-ux" # endif -# if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || (defined (ardent) && defined (titan))) +# if !defined (KERNEL_FILE) && (defined (_SEQUENT_) || defined (MIPS) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan))) # define KERNEL_FILE "/unix" # endif @@ -398,7 +353,7 @@ extern int errno; # define LDAV_SYMBOL "_Loadavg" # endif -# if !defined(LDAV_SYMBOL) && ((defined(hpux) && !defined(hp9000s300)) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi) || (defined (ardent) && defined (titan)) || defined (_AIX)) +# if !defined (LDAV_SYMBOL) && ((defined (hpux) && !defined (hp9000s300)) || defined (_SEQUENT_) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan)) || defined (_AIX)) # define LDAV_SYMBOL "avenrun" # endif @@ -410,7 +365,7 @@ extern int errno; /* LOAD_AVE_TYPE should only get defined if we're going to use the nlist method. */ -# if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) +# if !defined (LOAD_AVE_TYPE) && (defined (BSD) || defined (LDAV_CVT) || defined (KERNEL_FILE) || defined (LDAV_SYMBOL)) # define LOAD_AVE_TYPE double # endif @@ -459,7 +414,7 @@ extern int errno; # endif /* LOAD_AVE_TYPE */ -# if defined(__GNU__) && !defined (NeXT) +# if defined (__GNU__) && !defined (NeXT) /* Note that NeXT Openstep defines __GNU__ even though it should not. */ /* GNU system acts much like NeXT, for load average purposes, but not exactly. */ @@ -506,7 +461,7 @@ extern int errno; # include # endif -# if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) +# if defined (HAVE_FCNTL_H) || defined (_POSIX_VERSION) # include # else # include @@ -528,7 +483,7 @@ static unsigned int samples; static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ # endif /* DGUX */ -# ifdef LOAD_AVE_TYPE +# if !defined (HAVE_LIBKSTAT) && defined (LOAD_AVE_TYPE) /* File descriptor open to /dev/kmem or VMS load ave driver. */ static int channel; /* Nonzero iff channel is valid. */ @@ -536,7 +491,7 @@ static int getloadavg_initialized; /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; -# if !defined(VMS) && !defined(sgi) && !defined(__linux__) +# if !defined (VMS) && !defined (sgi) && !defined (__linux__) static struct nlist nl[2]; # endif /* Not VMS or sgi */ @@ -544,7 +499,7 @@ static struct nlist nl[2]; static kvm_t *kd; # endif /* SUNOS_5 */ -# endif /* LOAD_AVE_TYPE */ +# endif /* LOAD_AVE_TYPE && !HAVE_LIBKSTAT */ /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. @@ -552,9 +507,7 @@ static kvm_t *kd; or -1 if an error occurred. */ int -getloadavg (loadavg, nelem) - double loadavg[]; - int nelem; +getloadavg (double loadavg[], int nelem) { int elem = 0; /* Return value. */ @@ -577,7 +530,7 @@ getloadavg (loadavg, nelem) if (kc == 0) return -1; ksp = kstat_lookup (kc, "unix", 0, "system_misc"); - if (ksp == 0 ) + if (ksp == 0) return -1; if (kstat_read (kc, ksp, 0) == -1) return -1; @@ -592,20 +545,20 @@ getloadavg (loadavg, nelem) } if (nelem >= 1) - loadavg[elem++] = (double) kn->value.ul/FSCALE; + loadavg[elem++] = (double) kn->value.ul / FSCALE; if (nelem >= 2) { kn = kstat_data_lookup (ksp, "avenrun_5min"); if (kn != 0) { - loadavg[elem++] = (double) kn->value.ul/FSCALE; + loadavg[elem++] = (double) kn->value.ul / FSCALE; if (nelem >= 3) { kn = kstat_data_lookup (ksp, "avenrun_15min"); if (kn != 0) - loadavg[elem++] = (double) kn->value.ul/FSCALE; + loadavg[elem++] = (double) kn->value.ul / FSCALE; } } } @@ -870,8 +823,8 @@ getloadavg (loadavg, nelem) for (elem = 0; elem < nelem; elem++) loadavg[elem] = (load_ave.tl_lscale == 0 - ? load_ave.tl_avenrun.d[elem] - : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); + ? load_ave.tl_avenrun.d[elem] + : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); # endif /* OSF_ALPHA */ # if !defined (LDAV_DONE) && defined (VMS) @@ -914,7 +867,7 @@ getloadavg (loadavg, nelem) return -1; # endif /* VMS */ -# if !defined (LDAV_DONE) && defined(LOAD_AVE_TYPE) && !defined(VMS) +# if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) && !defined (VMS) /* UNIX-specific code -- read the average from /dev/kmem. */ @@ -930,13 +883,13 @@ getloadavg (loadavg, nelem) strcpy (nl[0].n_name, LDAV_SYMBOL); strcpy (nl[1].n_name, ""); # else /* NLIST_STRUCT */ -# ifdef NLIST_NAME_UNION +# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME nl[0].n_un.n_name = LDAV_SYMBOL; nl[1].n_un.n_name = 0; -# else /* not NLIST_NAME_UNION */ +# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ nl[0].n_name = LDAV_SYMBOL; nl[1].n_name = 0; -# endif /* not NLIST_NAME_UNION */ +# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */ # endif /* NLIST_STRUCT */ # ifndef SUNOS_5 @@ -973,12 +926,7 @@ getloadavg (loadavg, nelem) { /* Set the channel to close on exec, so it does not litter any child's descriptor table. */ -# ifdef FD_SETFD -# ifndef FD_CLOEXEC -# define FD_CLOEXEC 1 -# endif - (void) fcntl (channel, F_SETFD, FD_CLOEXEC); -# endif + set_cloexec_flag (channel, true); getloadavg_initialized = 1; } # else /* SUNOS_5 */ @@ -1010,9 +958,9 @@ getloadavg (loadavg, nelem) # else /* SUNOS_5 */ if (kvm_read (kd, offset, (char *) load_ave, sizeof (load_ave)) != sizeof (load_ave)) - { - kvm_close (kd); - getloadavg_initialized = 0; + { + kvm_close (kd); + getloadavg_initialized = 0; } # endif /* SUNOS_5 */ } @@ -1046,9 +994,7 @@ getloadavg (loadavg, nelem) #ifdef TEST void -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int naptime = 0; diff --git a/lib/getopt.c b/lib/getopt.c index 289d137..6dcdbeb 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -2,24 +2,26 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002 - Free Software Foundation, Inc. + + Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, + Inc. + This file is part of the GNU C Library. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. - The GNU C Library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ @@ -31,14 +33,6 @@ # include #endif -#if !defined __STDC__ || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -# ifndef const -# define const -# endif -#endif - #include /* Comment out all this code if we are using the GNU C Library, and are not @@ -69,26 +63,22 @@ # include #endif /* GNU C library. */ +#include + #ifdef VMS # include -# if HAVE_STRING_H - 0 -# include -# endif #endif -#ifndef _ +#ifdef _LIBC +# include +#else /* This is for other GNU distributions with internationalized messages. */ -# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC -# include -# ifndef _ -# define _(msgid) gettext (msgid) -# endif -# else -# define _(msgid) (msgid) -# endif -# if defined _LIBC && defined USE_IN_LIBIO -# include -# endif +# include "gettext.h" +#endif +#define _(msgid) gettext (msgid) + +#if defined _LIBC && defined USE_IN_LIBIO +# include #endif #ifndef attribute_hidden @@ -197,20 +187,7 @@ static enum /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; -#ifdef __GNU_LIBRARY__ -/* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -# include -# define my_index strchr -#else - -# if HAVE_STRING_H -# include -# else -# include -# endif +#ifndef __GNU_LIBRARY__ /* Avoid depending on library functions or files whose names are inconsistent. */ @@ -219,32 +196,6 @@ static char *posixly_correct; extern char *getenv (); #endif -static char * -my_index (str, chr) - const char *str; - int chr; -{ - while (*str) - { - if (*str == chr) - return (char *) str; - str++; - } - return 0; -} - -/* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ -#ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -# if (!defined __STDC__ || !__STDC__) && !defined strlen -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -# endif /* not __STDC__ */ -#endif /* __GNUC__ */ - #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ @@ -298,13 +249,8 @@ static int nonoption_flags_len; `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ -#if defined __STDC__ && __STDC__ -static void exchange (char **); -#endif - static void -exchange (argv) - char **argv; +exchange (char **argv) { int bottom = first_nonopt; int middle = last_nonopt; @@ -384,14 +330,8 @@ exchange (argv) /* Initialize the internal data when the first call is made. */ -#if defined __STDC__ && __STDC__ -static const char *_getopt_initialize (int, char *const *, const char *); -#endif static const char * -_getopt_initialize (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +_getopt_initialize (int argc, char *const *argv, const char *optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped @@ -510,13 +450,9 @@ _getopt_initialize (argc, argv, optstring) long-named options. */ int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; +_getopt_internal (int argc, char *const *argv, + const char *optstring, const struct option *longopts, + int *longind, int long_only) { int print_errors = opterr; if (optstring[0] == ':') @@ -641,7 +577,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (longopts != NULL && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + || (long_only + && (argv[optind][2] || !strchr (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; @@ -826,7 +763,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) + || strchr (optstring, *nextchar) == NULL) { if (print_errors) { @@ -881,7 +818,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { char c = *nextchar++; - char *temp = my_index (optstring, c); + char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') @@ -1191,10 +1128,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, @@ -1210,9 +1144,7 @@ getopt (argc, argv, optstring) the above definition of `getopt'. */ int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/lib/getopt.h b/lib/getopt.h index 4283c35..5e15191 100644 --- a/lib/getopt.h +++ b/lib/getopt.h @@ -1,21 +1,23 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + + Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2001, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. - The GNU C Library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H @@ -78,7 +80,7 @@ extern int optopt; The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. + optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but @@ -93,11 +95,7 @@ extern int optopt; struct option { -# if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; -# else - char *name; -# endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; @@ -137,17 +135,16 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -#if (defined __STDC__ && __STDC__) || defined __cplusplus -# ifdef __GNU_LIBRARY__ +#ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); -# else /* not __GNU_LIBRARY__ */ +#else /* not __GNU_LIBRARY__ */ extern int getopt (); -# endif /* __GNU_LIBRARY__ */ +#endif /* __GNU_LIBRARY__ */ -# ifndef __need_getopt +#ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind); @@ -160,16 +157,7 @@ extern int _getopt_internal (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); -# endif -#else /* not __STDC__ */ -extern int getopt (); -# ifndef __need_getopt -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -# endif -#endif /* __STDC__ */ +#endif #ifdef __cplusplus } diff --git a/lib/getopt1.c b/lib/getopt1.c index ad06cc7..3288c72 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -1,22 +1,23 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 - Free Software Foundation, Inc. + + Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, + 1997, 1998, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. - The GNU C Library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include @@ -28,14 +29,6 @@ # include "getopt.h" #endif -#if !defined __STDC__ || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - #include /* Comment out all this code if we are using the GNU C Library, and are not @@ -68,12 +61,11 @@ #endif int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +getopt_long (int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } @@ -84,12 +76,11 @@ getopt_long (argc, argv, options, long_options, opt_index) instead. */ int -getopt_long_only (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +getopt_long_only (int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } @@ -106,9 +97,7 @@ libc_hidden_def (getopt_long_only) #include int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/lib/gettext.h b/lib/gettext.h index 8b262f4..835732e 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -1,20 +1,19 @@ /* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 diff --git a/lib/ls-mntd-fs.m4 b/lib/ls-mntd-fs.m4 index 3ba42a3..c28466b 100644 --- a/lib/ls-mntd-fs.m4 +++ b/lib/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -#serial 12 +#serial 14 dnl From Jim Meyering. dnl @@ -10,13 +10,20 @@ dnl AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS], [ AC_CHECK_FUNCS(listmntent getmntinfo) -AC_CHECK_HEADERS(mntent.h sys/param.h sys/ucred.h sys/mount.h sys/fs_types.h) +AC_CHECK_HEADERS_ONCE(sys/param.h) + +# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses +# NGROUPS (as the array dimension for a struct member) without a definition. +AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include ]) + +AC_CHECK_HEADERS(mntent.h sys/mount.h sys/fs_types.h) getfsstat_includes="\ $ac_includes_default #if HAVE_SYS_PARAM_H # include /* needed by powerpc-apple-darwin1.3.7 */ #endif #if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ # include /* needed by powerpc-apple-darwin1.3.7 */ #endif #if HAVE_SYS_MOUNT_H @@ -63,7 +70,7 @@ yes ac_list_mounted_fs=found AC_DEFINE(MOUNTED_LISTMNTENT, 1, [Define if there is a function named listmntent that can be used to - list all mounted filesystems. (UNICOS)]) + list all mounted filesystems. (UNICOS)]) fi fi @@ -79,8 +86,8 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_VMOUNT, 1, [Define if there is a function named mntctl that can be used to read - the list of mounted filesystems, and there is a system header file - that declares `struct vmount.' (AIX)]) + the list of mounted filesystems, and there is a system header file + that declares `struct vmount.' (AIX)]) fi fi @@ -117,9 +124,9 @@ if test $ac_cv_func_getmntent = yes; then if test $fu_cv_sys_mounted_getmntent1 = yes; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_GETMNTENT1, 1, - [Define if there is a function named getmntent for reading the list - of mounted filesystems, and that function takes a single argument. - (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) + [Define if there is a function named getmntent for reading the list + of mounted filesystems, and that function takes a single argument. + (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) fi fi @@ -134,8 +141,8 @@ if test $ac_cv_func_getmntent = yes; then if test $fu_cv_sys_mounted_getmntent2 = yes; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_GETMNTENT2, 1, - [Define if there is a function named getmntent for reading the list of - mounted filesystems, and that function takes two arguments. (SVR4)]) + [Define if there is a function named getmntent for reading the list of + mounted filesystems, and that function takes two arguments. (SVR4)]) fi fi @@ -166,7 +173,7 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_GETFSSTAT, 1, [Define if there is a function named getfsstat for reading the - list of mounted filesystems. (DEC Alpha running OSF/1)]) + list of mounted filesystems. (DEC Alpha running OSF/1)]) fi fi @@ -184,9 +191,9 @@ if test -z "$ac_list_mounted_fs"; then if test $fu_cv_sys_mounted_fread_fstyp = yes; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, -[Define if (like SVR2) there is no specific function for reading the - list of mounted filesystems, and your system has these header files: - and . (SVR3)]) + [Define if (like SVR2) there is no specific function for reading the + list of mounted filesystems, and your system has these header files: + and . (SVR3)]) fi fi @@ -204,7 +211,7 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_GETMNTINFO, 1, [Define if there is a function named getmntinfo for reading the - list of mounted filesystems. (4.4BSD, Darwin)]) + list of mounted filesystems. (4.4BSD, Darwin)]) fi fi @@ -222,7 +229,7 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_GETMNT, 1, [Define if there is a function named getmnt for reading the list of - mounted filesystems. (Ultrix)]) + mounted filesystems. (Ultrix)]) fi fi @@ -243,7 +250,7 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, [Define if there are functions named next_dev and fs_stat_dev for - reading the list of mounted filesystems. (BeOS)]) + reading the list of mounted filesystems. (BeOS)]) fi fi @@ -259,7 +266,8 @@ if test -z "$ac_list_mounted_fs"; then ac_list_mounted_fs=found AC_DEFINE(MOUNTED_FREAD, 1, [Define if there is no specific function for reading the list of - mounted filesystems. fread will be used to read /etc/mnttab. (SVR2) ]) + mounted filesystems. fread will be used to read /etc/mnttab. + (SVR2) ]) fi fi diff --git a/lib/malloc.c b/lib/malloc.c index 5e7674b..a43d169 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -22,14 +22,12 @@ #endif #undef malloc -#include - -char *malloc (); +#include /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ -char * +void * rpl_malloc (size_t n) { if (n == 0) diff --git a/lib/mountlist.c b/lib/mountlist.c index 1af3cbb..631be31 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -1,5 +1,5 @@ /* mountlist.c -- return a list of mounted filesystems - Copyright (C) 1991, 1992, 1997-2000 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,29 +15,24 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "config.h" +#if HAVE_CONFIG_H +# include +#endif #include #include -#include "mountlist.h" +#include +#include -#ifdef STDC_HEADERS -# include -#else -void free (); -#endif -#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) -# include -#else -# include +#include "xalloc.h" + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) #endif #ifndef strstr char *strstr (); #endif -/* char *xmalloc (); */ -/* char *realloc (); */ -/* char *xstrdup (); */ #include #ifndef errno @@ -56,18 +51,35 @@ extern int errno; # include #endif -#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ -# include -# include +#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ +# if HAVE_SYS_UCRED_H +# include /* needed on OSF V4.0 for definition of NGROUPS, + NGROUPS is used as an array dimension in ucred.h */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_SYS_MOUNT_H +# include +# endif +# if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +# else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +# endif #endif /* MOUNTED_GETFSSTAT */ #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ # include -# if !defined(MOUNTED) -# if defined(MNT_MNTTAB) /* HP-UX. */ +# if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ # define MOUNTED MNT_MNTTAB # endif -# if defined(MNTTABNAME) /* Dynix. */ +# if defined MNTTABNAME /* Dynix. */ # define MOUNTED MNTTABNAME # endif # endif @@ -121,12 +133,16 @@ extern int errno; # include #endif -#if defined (MNTOPT_IGNORE) && defined (HAVE_HASMNTOPT) +#undef MNT_IGNORE +#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT # define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) #else # define MNT_IGNORE(M) 0 #endif +#include "mountlist.h" +#include "unlocked-io.h" + #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ /* Return the value of the hexadecimal number represented by CP. No prefix (like '0x') or suffix (like 'h') is expected to be @@ -303,21 +319,22 @@ read_filesystem_list (int need_fs_type) remove. Specifically, automount create normal NFS mounts. */ - if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0) + if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0) return NULL; for (p = mntlist; p; p = p->next) { mnt = p->ment; - me = (struct mount_entry*) malloc(sizeof (struct mount_entry)); - me->me_devname = strdup(mnt->mnt_fsname); - me->me_mountdir = strdup(mnt->mnt_dir); - me->me_type = strdup(mnt->mnt_type); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = -1; *mtail = me; mtail = &me->me_next; } - freemntlist(mntlist); + freemntlist (mntlist); } #endif @@ -334,10 +351,11 @@ read_filesystem_list (int need_fs_type) while ((mnt = getmntent (fp))) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (mnt->mnt_fsname); - me->me_mountdir = strdup (mnt->mnt_dir); - me->me_type = strdup (mnt->mnt_type); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); devopt = strstr (mnt->mnt_opts, "dev="); @@ -373,10 +391,11 @@ read_filesystem_list (int need_fs_type) { char *fs_type = fsp_to_string (fsp); - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (fsp->f_mntfromname); - me->me_mountdir = strdup (fsp->f_mntonname); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); me->me_type = fs_type; + me->me_type_malloced = 0; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ @@ -398,10 +417,11 @@ read_filesystem_list (int need_fs_type) 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, (char *) 0))) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (fsd.fd_req.devname); - me->me_mountdir = strdup (fsd.fd_req.path); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsd.fd_req.devname); + me->me_mountdir = xstrdup (fsd.fd_req.path); me->me_type = gt_names[fsd.fd_req.fstype]; + me->me_type_malloced = 0; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = fsd.fd_req.dev; @@ -415,7 +435,7 @@ read_filesystem_list (int need_fs_type) } #endif /* MOUNTED_GETMNT. */ -#if defined (MOUNTED_FS_STAT_DEV) /* BeOS */ +#if defined MOUNTED_FS_STAT_DEV /* BeOS */ { /* The next_dev() and fs_stat_dev() system calls give the list of all filesystems, including the information returned by statvfs() @@ -458,19 +478,17 @@ read_filesystem_list (int need_fs_type) continue; if (strcmp (d->d_name, ".") == 0) - name = strdup ("/"); + name = xstrdup ("/"); else { - name = malloc (1 + strlen (d->d_name) + 1); + name = xmalloc (1 + strlen (d->d_name) + 1); name[0] = '/'; strcpy (name + 1, d->d_name); } if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) { - struct rootdir_entry *re; - - re = (struct rootdir_entry *) malloc (sizeof (struct rootdir_entry)); + struct rootdir_entry *re = xmalloc (sizeof *re); re->name = name; re->dev = statbuf.st_dev; re->ino = statbuf.st_ino; @@ -496,10 +514,11 @@ read_filesystem_list (int need_fs_type) if (re->dev == fi.dev && re->ino == fi.root) break; - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name); - me->me_mountdir = strdup (re != NULL ? re->name : fi.fsh_name); - me->me_type = strdup (fi.fsh_name); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name); + me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); + me->me_type = xstrdup (fi.fsh_name); + me->me_type_malloced = 1; me->me_dev = fi.dev; me->me_dummy = 0; me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; @@ -520,18 +539,21 @@ read_filesystem_list (int need_fs_type) } #endif /* MOUNTED_FS_STAT_DEV */ -#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ +#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */ { - int numsys, counter, bufsize; + int numsys, counter; + size_t bufsize; struct statfs *stats; - numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT); if (numsys < 0) return (NULL); + if (SIZE_MAX / sizeof *stats <= numsys) + xalloc_die (); - bufsize = (1 + numsys) * sizeof (struct statfs); - stats = (struct statfs *)malloc (bufsize); - numsys = getfsstat (stats, bufsize, MNT_WAIT); + bufsize = (1 + numsys) * sizeof *stats; + stats = xmalloc (bufsize); + numsys = getfsstat (stats, bufsize, MNT_NOWAIT); if (numsys < 0) { @@ -541,10 +563,11 @@ read_filesystem_list (int need_fs_type) for (counter = 0; counter < numsys; counter++) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (stats[counter].f_mntfromname); - me->me_mountdir = strdup (stats[counter].f_mntonname); - me->me_type = mnt_names[stats[counter].f_type]; + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (stats[counter].f_mntfromname); + me->me_mountdir = xstrdup (stats[counter].f_mntonname); + me->me_type = xstrdup (FS_TYPE (stats[counter])); + me->me_type_malloced = 1; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ @@ -558,7 +581,7 @@ read_filesystem_list (int need_fs_type) } #endif /* MOUNTED_GETFSSTAT */ -#if defined (MOUNTED_FREAD) || defined (MOUNTED_FREAD_FSTYP) /* SVR[23]. */ +#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */ { struct mnttab mnt; char *table = "/etc/mnttab"; @@ -570,17 +593,18 @@ read_filesystem_list (int need_fs_type) while (fread (&mnt, sizeof mnt, 1, fp) > 0) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); + me = xmalloc (sizeof *me); # ifdef GETFSTYP /* SVR3. */ - me->me_devname = strdup (mnt.mt_dev); + me->me_devname = xstrdup (mnt.mt_dev); # else - me->me_devname = malloc (strlen (mnt.mt_dev) + 6); + me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); strcpy (me->me_devname, "/dev/"); strcpy (me->me_devname + 5, mnt.mt_dev); # endif - me->me_mountdir = strdup (mnt.mt_filsys); + me->me_mountdir = xstrdup (mnt.mt_filsys); me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ me->me_type = ""; + me->me_type_malloced = 0; # ifdef GETFSTYP /* SVR3. */ if (need_fs_type) { @@ -589,7 +613,10 @@ read_filesystem_list (int need_fs_type) if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) - me->me_type = strdup (typebuf); + { + me->me_type = xstrdup (typebuf); + me->me_type_malloced = 1; + } } # endif me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); @@ -602,6 +629,7 @@ read_filesystem_list (int need_fs_type) if (ferror (fp)) { + /* The last fread() call must have failed. */ int saved_errno = errno; fclose (fp); errno = saved_errno; @@ -615,13 +643,14 @@ read_filesystem_list (int need_fs_type) #ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */ { - struct mntent **mnttbl=getmnttbl(),**ent; + struct mntent **mnttbl = getmnttbl (), **ent; for (ent=mnttbl;*ent;ent++) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup ( (*ent)->mt_resource); - me->me_mountdir = strdup( (*ent)->mt_directory); - me->me_type = strdup ((*ent)->mt_fstype); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup ( (*ent)->mt_resource); + me->me_mountdir = xstrdup ( (*ent)->mt_directory); + me->me_type = xstrdup ((*ent)->mt_fstype); + me->me_type_malloced = 1; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ @@ -630,7 +659,7 @@ read_filesystem_list (int need_fs_type) *mtail = me; mtail = &me->me_next; } - endmnttbl(); + endmnttbl (); } #endif @@ -679,10 +708,11 @@ read_filesystem_list (int need_fs_type) { while ((ret = getmntent (fp, &mnt)) == 0) { - me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); - me->me_devname = strdup (mnt.mnt_special); - me->me_mountdir = strdup (mnt.mnt_mountp); - me->me_type = strdup (mnt.mnt_fstype); + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt.mnt_special); + me->me_mountdir = xstrdup (mnt.mnt_mountp); + me->me_type = xstrdup (mnt.mnt_fstype); + me->me_type_malloced = 1; me->me_dummy = MNT_IGNORE (&mnt) != 0; me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ @@ -711,21 +741,32 @@ read_filesystem_list (int need_fs_type) int bufsize; char *entries, *thisent; struct vmount *vmp; + int n_entries; + int i; /* Ask how many bytes to allocate for the mounted filesystem info. */ - mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize); - entries = malloc (bufsize); + if (mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize) != 0) + return NULL; + entries = xmalloc (bufsize); /* Get the list of mounted filesystems. */ - mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); + n_entries = mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); + if (n_entries < 0) + { + int saved_errno = errno; + free (entries); + errno = saved_errno; + return NULL; + } - for (thisent = entries; thisent < entries + bufsize; - thisent += vmp->vmt_length) + for (i = 0, thisent = entries; + i < n_entries; + i++, thisent += vmp->vmt_length) { char *options, *ignore; vmp = (struct vmount *) thisent; - me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); + me = xmalloc (sizeof *me); if (vmp->vmt_flags & MNT_REMOTE) { char *host, *path; @@ -734,7 +775,7 @@ read_filesystem_list (int need_fs_type) /* Prepend the remote pathname. */ host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off; path = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off; - me->me_devname = malloc (strlen (host) + strlen (path) + 2); + me->me_devname = xmalloc (strlen (host) + strlen (path) + 2); strcpy (me->me_devname, host); strcat (me->me_devname, ":"); strcat (me->me_devname, path); @@ -742,11 +783,12 @@ read_filesystem_list (int need_fs_type) else { me->me_remote = 0; - me->me_devname = strdup (thisent + + me->me_devname = xstrdup (thisent + vmp->vmt_data[VMT_OBJECT].vmt_off); } - me->me_mountdir = strdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); - me->me_type = strdup (fstype_to_string (vmp->vmt_gfstype)); + me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); + me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); + me->me_type_malloced = 1; options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; ignore = strstr (options, "ignore"); me->me_dummy = (ignore @@ -777,7 +819,8 @@ read_filesystem_list (int need_fs_type) me = mount_list->me_next; free (mount_list->me_devname); free (mount_list->me_mountdir); - /* FIXME: me_type is not always malloced. */ + if (mount_list->me_type_malloced) + free (mount_list->me_type); free (mount_list); mount_list = me; } diff --git a/lib/mountlist.h b/lib/mountlist.h index c41490c..9e550a0 100644 --- a/lib/mountlist.h +++ b/lib/mountlist.h @@ -1,5 +1,7 @@ /* mountlist.h -- declarations for list of mounted filesystems - Copyright (C) 1991, 1992, 1998, 2000 Free Software Foundation, Inc. + + Copyright (C) 1991, 1992, 1998, 2000, 2001, 2002, 2003 Free + Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,27 +26,28 @@ struct mount_entry dev_t me_dev; /* Device number of me_mountdir. */ unsigned int me_dummy : 1; /* Nonzero for dummy filesystems. */ unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ + unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ struct mount_entry *me_next; }; -#ifndef PARAMS -# if defined PROTOTYPES || (defined __STDC__ && __STDC__) -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -#endif - -struct mount_entry *read_filesystem_list PARAMS ((int need_fs_type)); +struct mount_entry *read_filesystem_list (int need_fs_type); #ifndef ME_DUMMY -# define ME_DUMMY(fs_name, fs_type) \ - (!strcmp (fs_type, "auto") \ - || !strcmp (fs_type, "autofs") \ +# define ME_DUMMY(Fs_name, Fs_type) \ + (!strcmp (Fs_type, "autofs") \ /* for Irix 6.5 */ \ - || !strcmp (fs_type, "ignore")) + || !strcmp (Fs_type, "ignore")) #endif +#undef STREQ +#define STREQ(a, b) (strcmp ((a), (b)) == 0) + #ifndef ME_REMOTE -# define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0) +/* A file system is `remote' if its Fs_name contains a `:' + or if (it is of type smbfs and its Fs_name starts with `//'). */ +# define ME_REMOTE(Fs_name, Fs_type) \ + (strchr ((Fs_name), ':') != 0 \ + || ((Fs_name)[0] == '/' \ + && (Fs_name)[1] == '/' \ + && STREQ (Fs_type, "smbfs"))) #endif diff --git a/lib/onceonly.m4 b/lib/onceonly.m4 new file mode 100644 index 0000000..50b33f4 --- /dev/null +++ b/lib/onceonly.m4 @@ -0,0 +1,63 @@ +# onceonly.m4 serial 3 (gettext-0.12) +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl This file defines some "once only" variants of standard autoconf macros. +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC +dnl The advantage is that the check for each of the headers/functions/decls +dnl will be put only once into the 'configure' file. It keeps the size of +dnl the 'configure' file down, and avoids redundant output when 'configure' +dnl is run. +dnl The drawback is that the checks cannot be conditionalized. If you write +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to +dnl empty, and the check will be inserted before the body of the AC_DEFUNed +dnl function. + +dnl Autoconf version 2.57 or newer is recommended. +AC_PREREQ(2.54) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + AC_FOREACH([gl_HEADER_NAME], [$1], [ + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]), + [-./], [___])), [ + AC_CHECK_HEADERS(gl_HEADER_NAME) + ]) + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, + [-./], [___]))) + ]) +]) + +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ + : + AC_FOREACH([gl_FUNC_NAME], [$1], [ + AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ + AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME])) + ]) + AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) + ]) +]) + +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of +# AC_CHECK_DECLS(DECL1, DECL2, ...). +AC_DEFUN([AC_CHECK_DECLS_ONCE], [ + : + AC_FOREACH([gl_DECL_NAME], [$1], [ + AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ + AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) + ]) + AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) + ]) +]) diff --git a/lib/realloc.c b/lib/realloc.c index d0d3e4a..ccbf991 100644 --- a/lib/realloc.c +++ b/lib/realloc.c @@ -1,5 +1,5 @@ /* Work around bug on some systems where realloc (NULL, 0) fails. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,19 +22,14 @@ #endif #undef realloc -#include - -char *malloc (); -char *realloc (); +#include /* Change the size of an allocated block of memory P to N bytes, with error checking. If N is zero, change it to 1. If P is NULL, use malloc. */ -char * -rpl_realloc (p, n) - char *p; - size_t n; +void * +rpl_realloc (void *p, size_t n) { if (n == 0) n = 1; diff --git a/lib/snprintf.c b/lib/snprintf.c index 3de2a96..633517d 100644 --- a/lib/snprintf.c +++ b/lib/snprintf.c @@ -1,4 +1,8 @@ /* + * NOTE: If you change this file, please merge it into rsync, samba, etc. + */ + +/* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (papowell@astart.com) * It may be used for any purpose as long as this notice remains intact @@ -53,17 +57,57 @@ * got rid of fcvt code (twas buggy and made testing harder) * added C99 semantics * + * date: 2002/12/19 19:56:31; author: herb; state: Exp; lines: +2 -0 + * actually print args for %g and %e + * + * date: 2002/06/03 13:37:52; author: jmcd; state: Exp; lines: +8 -0 + * Since includes.h isn't included here, VA_COPY has to be defined here. I don't + * see any include file that is guaranteed to be here, so I'm defining it + * locally. Fixes AIX and Solaris builds. + * + * date: 2002/06/03 03:07:24; author: tridge; state: Exp; lines: +5 -13 + * put the ifdef for HAVE_VA_COPY in one place rather than in lots of + * functions + * + * date: 2002/05/17 14:51:22; author: jmcd; state: Exp; lines: +21 -4 + * Fix usage of va_list passed as an arg. Use __va_copy before using it + * when it exists. + * + * date: 2002/04/16 22:38:04; author: idra; state: Exp; lines: +20 -14 + * Fix incorrect zpadlen handling in fmtfp. + * Thanks to Ollie Oldham for spotting it. + * few mods to make it easier to compile the tests. + * addedd the "Ollie" test to the floating point ones. + * + * Martin Pool (mbp@samba.org) April 2003 + * Remove NO_CONFIG_H so that the test case can be built within a source + * tree with less trouble. + * Remove unnecessary SAFE_FREE() definition. + * + * Martin Pool (mbp@samba.org) May 2003 + * Put in a prototype for dummy_snprintf() to quiet compiler warnings. + * + * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even + * if the C library has some snprintf functions already. **************************************************************/ -#ifndef NO_CONFIG_H /* for some tests */ +#ifndef NO_CONFIG_H #include "config.h" #else #define NULL 0 -#endif +#endif #ifdef TEST_SNPRINTF /* need math library headers for testing */ -#include -#endif + +/* In test mode, we pretend that this system doesn't have any snprintf + * functions, regardless of what config.h says. */ +# undef HAVE_SNPRINTF +# undef HAVE_VSNPRINTF +# undef HAVE_C99_VSNPRINTF +# undef HAVE_ASPRINTF +# undef HAVE_VASPRINTF +# include +#endif /* TEST_SNPRINTF */ #ifdef HAVE_STRING_H #include @@ -75,12 +119,8 @@ #ifdef HAVE_CTYPE_H #include #endif -#ifdef HAVE_SYS_TYPES_H #include -#endif -#ifdef HAVE_STDARG_H #include -#endif #ifdef HAVE_STDLIB_H #include #endif @@ -89,8 +129,9 @@ /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ #include /* make the compiler happy with an empty file */ + void dummy_snprintf(void); void dummy_snprintf(void) {} -#else +#endif /* HAVE_SNPRINTF, etc */ #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double @@ -104,29 +145,17 @@ #define LLONG long #endif -/* free memory if the pointer is valid and zero the pointer */ -#ifndef SAFE_FREE -#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) -#endif - #ifndef VA_COPY #ifdef HAVE_VA_COPY +#define VA_COPY(dest, src) va_copy(dest, src) +#else +#ifdef HAVE___VA_COPY #define VA_COPY(dest, src) __va_copy(dest, src) #else #define VA_COPY(dest, src) (dest) = (src) #endif #endif -static size_t dopr(char *buffer, size_t maxlen, const char *format, - va_list args_in); -static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, - char *value, int flags, int min, int max); -static void fmtint(char *buffer, size_t *currlen, size_t maxlen, - long value, int base, int min, int max, int flags); -static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, - LDOUBLE fvalue, int min, int max, int flags); -static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); - /* * dopr(): poor man's version of doprintf */ @@ -161,6 +190,19 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); #define MAX(p,q) (((p) >= (q)) ? (p) : (q)) #endif +/* yes this really must be a ||. Don't muck with this (tridge) */ +#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) + +static size_t dopr(char *buffer, size_t maxlen, const char *format, + va_list args_in); +static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max); +static void fmtint(char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags); +static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags); +static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); + static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in) { char ch; @@ -345,6 +387,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'G': flags |= DP_F_UP; @@ -353,6 +396,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'c': dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); @@ -625,7 +669,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; - int index; + int idx; double intpart; double fracpart; double temp; @@ -684,11 +728,11 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, do { temp = intpart*0.1; my_modf(temp, &intpart); - index = (int) ((temp -intpart +0.05)* 10.0); - /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ - /* printf ("%llf, %f, %x\n", temp, intpart, index); */ + idx = (int) ((temp -intpart +0.05)* 10.0); + /* idx = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ + /* printf ("%llf, %f, %x\n", temp, intpart, idx); */ iconvert[iplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; } while (intpart && (iplace < 311)); if (iplace == 311) iplace--; iconvert[iplace] = 0; @@ -699,11 +743,11 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, do { temp = fracpart*0.1; my_modf(temp, &fracpart); - index = (int) ((temp -fracpart +0.05)* 10.0); - /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ - /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ + idx = (int) ((temp -fracpart +0.05)* 10.0); + /* idx = (int) ((((temp/10) -fracpart) +0.05) *10); */ + /* printf ("%lf, %lf, %ld\n", temp, fracpart, idx ); */ fconvert[fplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; } while(fracpart && (fplace < 311)); if (fplace == 311) fplace--; } @@ -773,24 +817,21 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) (*currlen)++; } -/* yes this really must be a ||. Don't muck with this (tridge) */ -#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) - int vsnprintf (char *str, size_t count, const char *fmt, va_list args) + int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args) { return dopr(str, count, fmt, args); } +#define vsnprintf smb_vsnprintf #endif -/* yes this really must be a ||. Don't muck wiith this (tridge) +/* yes this really must be a ||. Don't muck with this (tridge) * * The logic for these two is that we need our own definition if the * OS *either* has no definition of *sprintf, or if it does have one - * that doesn't work properly according to the autoconf test. Perhaps - * these should really be smb_snprintf to avoid conflicts with buggy - * linkers? -- mbp + * that doesn't work properly according to the autoconf test. */ -#if !defined(HAVE_SNPRINTF) /* || !defined(HAVE_C99_SNPRINTF) */ - int snprintf(char *str,size_t count,const char *fmt,...) +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) +int smb_snprintf(char *str,size_t count,const char *fmt,...) { size_t ret; va_list ap; @@ -800,6 +841,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) va_end(ap); return ret; } +#define snprintf smb_snprintf #endif #endif @@ -868,8 +910,9 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) "-16.16f", NULL }; - double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 5.030201, 0}; + double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 203.9, 0.96, 0.996, + 0.9996, 1.996, 4.136, 5.030201, 0.00205, + /* END LIST */ 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", @@ -977,4 +1020,4 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) return 0; } -#endif /* SNPRINTF_TEST */ +#endif /* TEST_SNPRINTF */ diff --git a/lib/strtod.c b/lib/strtod.c index 10edb5c..161f97a 100644 --- a/lib/strtod.c +++ b/lib/strtod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1997, 1999, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,22 +37,9 @@ extern int errno; #include -#if HAVE_FLOAT_H -# include -#else -# define DBL_MAX 1.7976931348623159e+308 -# define DBL_MIN 2.2250738585072010e-308 -#endif - -#if STDC_HEADERS -# include -# include -#else -# define NULL 0 -# ifndef HUGE_VAL -# define HUGE_VAL HUGE -# endif -#endif +#include +#include +#include /* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the character after the last one used in the number is put in *ENDPTR. */ diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h index a7240fb..36a7a48 100644 --- a/lib/unlocked-io.h +++ b/lib/unlocked-io.h @@ -1,21 +1,20 @@ /* Prefer faster, non-thread-safe stdio functions if available. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Jim Meyering. */ @@ -28,63 +27,106 @@ # if USE_UNLOCKED_IO -/* These are wrappers for functions/macros from GNU libc. +/* These are wrappers for functions/macros from the GNU C library, and + from other C libraries supporting POSIX's optional thread-safe functions. + The standard I/O functions are thread-safe. These *_unlocked ones are more efficient but not thread-safe. That they're not thread-safe is - fine since all of the applications in this package are single threaded. */ + fine since all of the applications in this package are single threaded. + + Also, some code that is shared with the GNU C library may invoke + the *_unlocked functions directly. On hosts that lack those + functions, invoke the non-thread-safe versions instead. */ + +# include # if HAVE_DECL_CLEARERR_UNLOCKED # undef clearerr # define clearerr(x) clearerr_unlocked (x) +# else +# define clearerr_unlocked(x) clearerr (x) # endif # if HAVE_DECL_FEOF_UNLOCKED # undef feof # define feof(x) feof_unlocked (x) +# else +# define feof_unlocked(x) feof (x) # endif # if HAVE_DECL_FERROR_UNLOCKED # undef ferror # define ferror(x) ferror_unlocked (x) +# else +# define ferror_unlocked(x) ferror (x) # endif # if HAVE_DECL_FFLUSH_UNLOCKED # undef fflush # define fflush(x) fflush_unlocked (x) +# else +# define fflush_unlocked(x) fflush (x) # endif # if HAVE_DECL_FGETS_UNLOCKED # undef fgets # define fgets(x,y,z) fgets_unlocked (x,y,z) +# else +# define fgets_unlocked(x,y,z) fgets (x,y,z) # endif # if HAVE_DECL_FPUTC_UNLOCKED # undef fputc # define fputc(x,y) fputc_unlocked (x,y) +# else +# define fputc_unlocked(x,y) fputc (x,y) # endif # if HAVE_DECL_FPUTS_UNLOCKED # undef fputs # define fputs(x,y) fputs_unlocked (x,y) +# else +# define fputs_unlocked(x,y) fputs (x,y) # endif # if HAVE_DECL_FREAD_UNLOCKED # undef fread # define fread(w,x,y,z) fread_unlocked (w,x,y,z) +# else +# define fread_unlocked(w,x,y,z) fread (w,x,y,z) # endif # if HAVE_DECL_FWRITE_UNLOCKED # undef fwrite # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z) +# else +# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) # endif # if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc(x) getc_unlocked (x) +# else +# define getc_unlocked(x) getc (x) # endif # if HAVE_DECL_GETCHAR_UNLOCKED # undef getchar # define getchar() getchar_unlocked () +# else +# define getchar_unlocked() getchar () # endif # if HAVE_DECL_PUTC_UNLOCKED # undef putc # define putc(x,y) putc_unlocked (x,y) +# else +# define putc_unlocked(x,y) putc (x,y) # endif # if HAVE_DECL_PUTCHAR_UNLOCKED # undef putchar # define putchar(x) putchar_unlocked (x) +# else +# define putchar_unlocked(x) putchar (x) # endif +# undef flockfile +# define flockfile(x) ((void) 0) + +# undef ftrylockfile +# define ftrylockfile(x) 0 + +# undef funlockfile +# define funlockfile(x) ((void) 0) + # endif /* USE_UNLOCKED_IO */ #endif /* UNLOCKED_IO_H */ diff --git a/lib/unlocked-io.m4 b/lib/unlocked-io.m4 new file mode 100644 index 0000000..f8e98f1 --- /dev/null +++ b/lib/unlocked-io.m4 @@ -0,0 +1,22 @@ +#serial 8 -*- autoconf -*- + +dnl From Jim Meyering. +dnl +dnl See if the glibc *_unlocked I/O macros or functions are available. +dnl Use only those *_unlocked macros or functions that are declared +dnl (because some of them were declared in Solaris 2.5.1 but were removed +dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run +dnl on Solaris 2.6). + +AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO], +[ + dnl Persuade glibc and Solaris to declare + dnl fgets_unlocked(), fputs_unlocked() etc. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_DECLS_ONCE( + [clearerr_unlocked feof_unlocked ferror_unlocked + fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked + fread_unlocked fwrite_unlocked getc_unlocked + getchar_unlocked putc_unlocked putchar_unlocked]) +]) diff --git a/lib/xalloc.h b/lib/xalloc.h index 098a6c2..4b65858 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -1,5 +1,7 @@ /* xalloc.h -- malloc with out-of-memory checking - Copyright (C) 1990-1998, 1999, 2000 Free Software Foundation, Inc. + + Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,13 +20,7 @@ #ifndef XALLOC_H_ # define XALLOC_H_ -# ifndef PARAMS -# if defined PROTOTYPES || (defined __STDC__ && __STDC__) -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -# endif +# include # ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ @@ -36,14 +32,9 @@ # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # endif -/* Exit value when the requested amount of memory is not available. - It is initialized to EXIT_FAILURE, but the caller may set it to - some other value. */ -extern int xalloc_exit_failure; - /* If this pointer is non-zero, run the specified function upon each allocation failure. It is initialized to zero. */ -extern void (*xalloc_fail_func) PARAMS ((void)); +extern void (*xalloc_fail_func) (void); /* If XALLOC_FAIL_FUNC is undefined or a function that returns, this message is output. It is translated via gettext. @@ -51,37 +42,46 @@ extern void (*xalloc_fail_func) PARAMS ((void)); extern char const xalloc_msg_memory_exhausted[]; /* This function is always triggered when memory is exhausted. It is - in charge of honoring the three previous items. This is the + in charge of honoring the two previous items. It exits with status + exit_failure (defined in exitfail.h). This is the function to call when one wants the program to die because of a memory allocation failure. */ -extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN; - -void *xmalloc PARAMS ((size_t n)); -void *xcalloc PARAMS ((size_t n, size_t s)); -void *xrealloc PARAMS ((void *p, size_t n)); -char *xstrdup PARAMS ((const char *str)); - -# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items))) -# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items))) -# define XREALLOC(Ptr, Type, N_items) \ - ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items))) - -/* Declare and alloc memory for VAR of type TYPE. */ -# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1) - -/* Free VAR only if non NULL. */ -# define XFREE(Var) \ - do { \ - if (Var) \ - free (Var); \ - } while (0) - -/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */ -# define CCLONE(Src, Num) \ - (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num))) - -/* Return a malloc'ed copy of SRC. */ -# define CLONE(Src) CCLONE (Src, 1) - +extern void xalloc_die (void) ATTRIBUTE_NORETURN; + +void *xmalloc (size_t s); +void *xnmalloc (size_t n, size_t s); +void *xzalloc (size_t s); +void *xcalloc (size_t n, size_t s); +void *xrealloc (void *p, size_t s); +void *xnrealloc (void *p, size_t n, size_t s); +void *x2realloc (void *p, size_t *pn); +void *x2nrealloc (void *p, size_t *pn, size_t s); +void *xclone (void const *p, size_t s); +char *xstrdup (const char *str); + +/* Return 1 if an array of N objects, each of size S, cannot exist due + to size arithmetic overflow. S must be positive and N must be + nonnegative. This is a macro, not an inline function, so that it + works correctly even when SIZE_MAX < N. + + By gnulib convention, SIZE_MAX represents overflow in size + calculations, so the conservative dividend to use here is + SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. + However, malloc (SIZE_MAX) fails on all known hosts where + sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for + exactly-SIZE_MAX allocations on such hosts; this avoids a test and + branch when S is known to be 1. */ +# define xalloc_oversized(n, s) \ + ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) + +/* These macros are deprecated; they will go away soon, and are retained + temporarily only to ease conversion to the functions described above. */ +# define CCLONE(p, n) xclone (p, (n) * sizeof *(p)) +# define CLONE(p) xclone (p, sizeof *(p)) +# define NEW(type, var) type *var = xmalloc (sizeof (type)) +# define XCALLOC(type, n) xcalloc (n, sizeof (type)) +# define XMALLOC(type, n) xnmalloc (n, sizeof (type)) +# define XREALLOC(p, type, n) xnrealloc (p, n, sizeof (type)) +# define XFREE(p) free (p) #endif /* !XALLOC_H_ */ diff --git a/lib/xalloc.m4 b/lib/xalloc.m4 new file mode 100644 index 0000000..dec8417 --- /dev/null +++ b/lib/xalloc.m4 @@ -0,0 +1,32 @@ +# xalloc.m4 serial 8 +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +AC_DEFUN([gl_XALLOC], +[ + gl_PREREQ_XALLOC + gl_PREREQ_XMALLOC + gl_PREREQ_XSTRDUP +]) + +# Prerequisites of lib/xalloc.h. +AC_DEFUN([gl_PREREQ_XALLOC], [ + : +]) + +# Prerequisites of lib/xmalloc.c. +AC_DEFUN([gl_PREREQ_XMALLOC], [ + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([jm_FUNC_MALLOC]) + AC_REQUIRE([jm_FUNC_REALLOC]) + : +]) + +# Prerequisites of lib/xstrdup.c. +AC_DEFUN([gl_PREREQ_XSTRDUP], [ + : +]) diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 3affee7..181006b 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -1,5 +1,7 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc. + + Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2003, + 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,30 +21,22 @@ # include #endif -#include +#include "xalloc.h" -#if STDC_HEADERS -# include -#else -void *calloc (); -void *malloc (); -void *realloc (); -void free (); -#endif +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #include "error.h" -#include "xalloc.h" +#include "exitfail.h" -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) #endif -/* The following tests require AC_PREREQ(2.54). */ - #ifndef HAVE_MALLOC "you must run the autoconf test for a GNU libc compatible malloc" #endif @@ -51,12 +45,8 @@ void free (); "you must run the autoconf test for a GNU libc compatible realloc" #endif -/* Exit value when the requested amount of memory is not available. - The caller may set it to some other value. */ -int xalloc_exit_failure = EXIT_FAILURE; - /* If non NULL, call this function when memory is exhausted. */ -void (*xalloc_fail_func) PARAMS ((void)) = 0; +void (*xalloc_fail_func) (void) = 0; /* If XALLOC_FAIL_FUNC is NULL, or does return, display this message before exiting when memory is exhausted. Goes through gettext. */ @@ -67,11 +57,29 @@ xalloc_die (void) { if (xalloc_fail_func) (*xalloc_fail_func) (); - error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted)); + error (exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted)); /* The `noreturn' cannot be given to error, since it may return if its first argument is 0. To help compilers understand the - xalloc_die does terminate, call exit. */ - exit (EXIT_FAILURE); + xalloc_die does terminate, call abort. */ + abort (); +} + +/* Allocate an array of N objects, each with S bytes of memory, + dynamically, with error checking. S must be nonzero. */ + +static inline void * +xnmalloc_inline (size_t n, size_t s) +{ + void *p; + if (xalloc_oversized (n, s) || ! (p = malloc (n * s))) + xalloc_die (); + return p; +} + +void * +xnmalloc (size_t n, size_t s) +{ + return xnmalloc_inline (n, s); } /* Allocate N bytes of memory dynamically, with error checking. */ @@ -79,35 +87,169 @@ xalloc_die (void) void * xmalloc (size_t n) { - void *p; + return xnmalloc_inline (n, 1); +} + +/* Change the size of an allocated block of memory P to an array of N + objects each of S bytes, with error checking. S must be nonzero. */ - p = malloc (n); - if (p == 0) +static inline void * +xnrealloc_inline (void *p, size_t n, size_t s) +{ + if (xalloc_oversized (n, s) || ! (p = realloc (p, n * s))) xalloc_die (); return p; } +void * +xnrealloc (void *p, size_t n, size_t s) +{ + return xnrealloc_inline (p, n, s); +} + /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * xrealloc (void *p, size_t n) { - p = realloc (p, n); - if (p == 0) - xalloc_die (); - return p; + return xnrealloc_inline (p, n, 1); } -/* Allocate memory for N elements of S bytes, with error checking. */ + +/* If P is null, allocate a block of at least *PN such objects; + otherwise, reallocate P so that it contains more than *PN objects + each of S bytes. *PN must be nonzero unless P is null, and S must + be nonzero. Set *PN to the new number of objects, and return the + pointer to the new block. *PN is never set to zero, and the + returned pointer is never null. + + Repeated reallocations are guaranteed to make progress, either by + allocating an initial block with a nonzero size, or by allocating a + larger block. + + In the following implementation, nonzero sizes are doubled so that + repeated reallocations have O(N log N) overall cost rather than + O(N**2) cost, but the specification for this function does not + guarantee that sizes are doubled. + + Here is an example of use: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + + void + append_int (int value) + { + if (used == allocated) + p = x2nrealloc (p, &allocated, sizeof *p); + p[used++] = value; + } + + This causes x2nrealloc to allocate a block of some nonzero size the + first time it is called. + + To have finer-grained control over the initial size, set *PN to a + nonzero value before calling this function with P == NULL. For + example: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + size_t allocated1 = 1000; + + void + append_int (int value) + { + if (used == allocated) + { + p = x2nrealloc (p, &allocated1, sizeof *p); + allocated = allocated1; + } + p[used++] = value; + } + + */ + +static inline void * +x2nrealloc_inline (void *p, size_t *pn, size_t s) +{ + size_t n = *pn; + + if (! p) + { + if (! n) + { + /* The approximate size to use for initial small allocation + requests, when the invoking code specifies an old size of + zero. 64 bytes is the largest "small" request for the + GNU C library malloc. */ + enum { DEFAULT_MXFAST = 64 }; + + n = DEFAULT_MXFAST / s; + n += !n; + } + } + else + { + if (SIZE_MAX / 2 / s < n) + xalloc_die (); + n *= 2; + } + + *pn = n; + return xrealloc (p, n * s); +} + +void * +x2nrealloc (void *p, size_t *pn, size_t s) +{ + return x2nrealloc_inline (p, pn, s); +} + +/* If P is null, allocate a block of at least *PN bytes; otherwise, + reallocate P so that it contains more than *PN bytes. *PN must be + nonzero unless P is null. Set *PN to the new block's size, and + return the pointer to the new block. *PN is never set to zero, and + the returned pointer is never null. */ + +void * +x2realloc (void *p, size_t *pn) +{ + return x2nrealloc_inline (p, pn, 1); +} + +/* Allocate S bytes of zeroed memory dynamically, with error checking. + There's no need for xnzalloc (N, S), since it would be equivalent + to xcalloc (N, S). */ + +void * +xzalloc (size_t s) +{ + return memset (xmalloc (s), 0, s); +} + +/* Allocate zeroed memory for N elements of S bytes, with error + checking. S must be nonzero. */ void * xcalloc (size_t n, size_t s) { void *p; - - p = calloc (n, s); - if (p == 0) + /* Test for overflow, since some calloc implementations don't have + proper overflow checks. */ + if (xalloc_oversized (n, s) || ! (p = calloc (n, s))) xalloc_die (); return p; } + +/* Clone an object P of size S, with error checking. There's no need + for xnclone (P, N, S), since xclone (P, N * S) works without any + need for an arithmetic overflow check. */ + +void * +xclone (void const *p, size_t s) +{ + return memcpy (xmalloc (s), p, s); +} diff --git a/lib/xstrdup.c b/lib/xstrdup.c new file mode 100644 index 0000000..58f18be --- /dev/null +++ b/lib/xstrdup.c @@ -0,0 +1,33 @@ +/* xstrdup.c -- copy a string with out of memory checking + Copyright (C) 1990, 1996, 1998, 2001, 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#if HAVE_CONFIG_H +# include +#endif + +/* Specification. */ +#include "xalloc.h" + +#include + +/* Return a newly allocated copy of STRING. */ + +char * +xstrdup (const char *string) +{ + return xclone (string, strlen (string) + 1); +} diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 3beb568..7841c14 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -17,6 +17,7 @@ *****************************************************************************/ const char *progname = "check_disk"; +const char *program_name = "check_disk"; // Required for coreutils libs const char *revision = "$Revision$"; const char *copyright = "1999-2003"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; diff --git a/po/de.po b/po/de.po index 8b89246..fe2e671 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: nagios-plugins 1.3.99\n" -"POT-Creation-Date: 2003-10-29 21:39-0500\n" +"POT-Creation-Date: 2004-11-12 00:44+0000\n" "PO-Revision-Date: 2003-07-20 22:24-0400\n" "Last-Translator: Michael Wirtgen \n" "Language-Team: de \n" @@ -16,104 +16,110 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Report-Msgid-Bugs-To: \n" -#: plugins/check_by_ssh.c:69 plugins/check_dig.c:68 plugins/check_disk.c:164 -#: plugins/check_fping.c:69 plugins/check_nagios.c:64 plugins/check_nt.c:103 -#: plugins/check_nwstat.c:125 plugins/check_radius.c:111 -#: plugins/check_ssh.c:56 plugins/check_tcp.c:211 plugins/check_users.c:49 +#: plugins/check_by_ssh.c:70 plugins/check_dig.c:70 plugins/check_disk.c:165 +#: plugins/check_fping.c:69 plugins/check_nagios.c:67 plugins/check_nt.c:112 +#: plugins/check_nwstat.c:126 plugins/check_radius.c:112 +#: plugins/check_ssh.c:56 plugins/check_tcp.c:212 plugins/check_users.c:52 #: plugins/negate.c:83 msgid "Could not parse arguments\n" msgstr "" -#: plugins/check_by_ssh.c:74 plugins/check_dns.c:91 plugins/check_nagios.c:68 -#: plugins/check_pgsql.c:140 plugins/check_ping.c:84 plugins/negate.c:87 +#: plugins/check_by_ssh.c:75 plugins/check_dns.c:69 plugins/check_nagios.c:71 +#: plugins/check_pgsql.c:140 plugins/check_ping.c:86 plugins/negate.c:87 msgid "Cannot catch SIGALRM" msgstr "" -#: plugins/check_by_ssh.c:88 +#: plugins/check_by_ssh.c:89 #, c-format msgid "Unable to open pipe: %s" msgstr "" -#: plugins/check_by_ssh.c:96 plugins/check_dig.c:89 plugins/check_dns.c:117 +#: plugins/check_by_ssh.c:97 plugins/check_dig.c:97 plugins/check_dns.c:96 #: plugins/check_fping.c:89 plugins/check_hpjd.c:118 plugins/check_load.c:115 -#: plugins/check_nagios.c:101 plugins/check_procs.c:129 -#: plugins/check_snmp.c:179 plugins/check_swap.c:137 plugins/check_users.c:60 +#: plugins/check_nagios.c:107 plugins/check_procs.c:133 +#: plugins/check_snmp.c:179 plugins/check_swap.c:157 plugins/check_users.c:63 #: plugins/negate.c:97 plugins/urlize.c:93 #, c-format msgid "Could not open stderr for %s\n" msgstr "" -#: plugins/check_by_ssh.c:123 +#: plugins/check_by_ssh.c:129 #, c-format msgid "SSH WARNING: could not open %s\n" msgstr "" -#: plugins/check_by_ssh.c:142 +#: plugins/check_by_ssh.c:148 #, c-format msgid "[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n" msgstr "" -#: plugins/check_by_ssh.c:228 +#: plugins/check_by_ssh.c:235 msgid "timeout interval must be an integer" msgstr "" -#: plugins/check_by_ssh.c:234 +#: plugins/check_by_ssh.c:241 msgid "invalid host name" msgstr "" -#: plugins/check_by_ssh.c:239 +#: plugins/check_by_ssh.c:246 msgid "port must be an integer" msgstr "" -#: plugins/check_by_ssh.c:284 +#: plugins/check_by_ssh.c:288 +msgid "skip lines must be an integer" +msgstr "" + +#: plugins/check_by_ssh.c:298 #, c-format msgid "%s: You must provide a host name\n" msgstr "" -#: plugins/check_by_ssh.c:286 +#: plugins/check_by_ssh.c:300 #, c-format msgid "%s: Invalid host name %s\n" msgstr "" -#: plugins/check_by_ssh.c:302 +#: plugins/check_by_ssh.c:316 msgid "No remotecmd\n" msgstr "" -#: plugins/check_by_ssh.c:320 +#: plugins/check_by_ssh.c:334 #, c-format msgid "" "%s: In passive mode, you must provide a service name for each command.\n" msgstr "" -#: plugins/check_by_ssh.c:323 +#: plugins/check_by_ssh.c:337 #, c-format msgid "" "%s: In passive mode, you must provide the host short name from the nagios " "configs.\n" msgstr "" -#: plugins/check_by_ssh.c:338 +#: plugins/check_by_ssh.c:352 msgid "" "Copyright (c) 1999 Karl DeBisschop \n" msgstr "" -#: plugins/check_by_ssh.c:341 +#: plugins/check_by_ssh.c:355 msgid "" "This plugin uses SSH to execute commands on a remote host\n" "\n" msgstr "" -#: plugins/check_by_ssh.c:351 +#: plugins/check_by_ssh.c:365 msgid "" " -1, --proto1\n" " tell ssh to use Protocol 1\n" " -2, --proto2\n" " tell ssh to use Protocol 2\n" +" -S, --skiplines=n\n" +" Ignore first n lines on STDERR (to suppress a logon banner)\n" " -f\n" " tells ssh to fork rather than create a tty\n" msgstr "" -#: plugins/check_by_ssh.c:359 +#: plugins/check_by_ssh.c:375 msgid "" " -C, --command='COMMAND STRING'\n" " command to execute on the remote machine\n" @@ -129,7 +135,7 @@ msgid "" " short name of host in nagios configuration [optional]\n" msgstr "" -#: plugins/check_by_ssh.c:377 +#: plugins/check_by_ssh.c:393 msgid "" "\n" "The most common mode of use is to refer to a local identity file with\n" @@ -141,7 +147,7 @@ msgid "" "execute additional commands as proxy\n" msgstr "" -#: plugins/check_by_ssh.c:386 +#: plugins/check_by_ssh.c:402 msgid "" "\n" "To use passive mode, provide multiple '-C' options, and provide\n" @@ -149,7 +155,18 @@ msgid "" "options)\n" msgstr "" -#: plugins/check_by_ssh.c:401 +#: plugins/check_by_ssh.c:407 +msgid "" +"\n" +"$ check_by_ssh -H localhost -n lh -s c1:c2:c3 \\\n" +" -C uptime -C uptime -C uptime -O /tmp/foo\n" +"$ cat /tmp/foo\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c1;0; up 2 days...\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days...\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days...\n" +msgstr "" + +#: plugins/check_by_ssh.c:425 #, c-format msgid "" "\n" @@ -157,99 +174,105 @@ msgid "" " -C [-n name] [-s servicelist] [-O outputfile] [-p port]\n" msgstr "" -#: plugins/check_dig.c:65 +#: plugins/check_dig.c:67 msgid "Cannot catch SIGALRM\n" msgstr "" -#: plugins/check_dig.c:83 plugins/check_dns.c:111 plugins/check_hpjd.c:112 -#: plugins/check_nagios.c:95 plugins/check_procs.c:123 -#: plugins/check_snmp.c:173 plugins/check_swap.c:131 plugins/check_users.c:54 +#: plugins/check_dig.c:91 plugins/check_dns.c:90 plugins/check_hpjd.c:112 +#: plugins/check_nagios.c:101 plugins/check_procs.c:127 +#: plugins/check_snmp.c:173 plugins/check_swap.c:151 plugins/check_users.c:57 #: plugins/negate.c:93 plugins/urlize.c:87 #, c-format msgid "Could not open pipe: %s\n" msgstr "" -#: plugins/check_dig.c:108 +#: plugins/check_dig.c:128 msgid "Server not found in ANSWER SECTION" msgstr "" -#: plugins/check_dig.c:118 +#: plugins/check_dig.c:137 msgid "No ANSWER SECTION found" msgstr "" -#: plugins/check_dig.c:135 +#: plugins/check_dig.c:154 msgid "dig returned error status" msgstr "" -#: plugins/check_dig.c:142 plugins/check_dns.c:221 plugins/check_dns.c:224 -#: plugins/check_dns.c:227 +#: plugins/check_dig.c:161 plugins/check_dns.c:205 plugins/check_dns.c:208 +#: plugins/check_dns.c:211 msgid " Probably a non-existent host/domain" msgstr "" -#: plugins/check_dig.c:150 +#: plugins/check_dig.c:169 #, c-format msgid "%.3f seconds response time (%s)" msgstr "" -#: plugins/check_dig.c:198 plugins/check_pgsql.c:210 plugins/check_ping.c:199 -#: plugins/check_time.c:206 plugins/negate.c:172 plugins/urlize.c:72 +#: plugins/check_dig.c:219 plugins/check_pgsql.c:209 plugins/check_ping.c:201 +#: plugins/check_time.c:220 plugins/negate.c:172 plugins/urlize.c:72 msgid "Unknown argument" msgstr "" -#: plugins/check_dig.c:210 plugins/check_dig.c:265 plugins/check_hpjd.c:347 -#: plugins/check_real.c:368 plugins/check_smtp.c:314 +#: plugins/check_dig.c:231 plugins/check_dig.c:288 plugins/check_hpjd.c:347 +#: plugins/check_real.c:368 plugins/check_smtp.c:386 msgid "Invalid host name" msgstr "" -#: plugins/check_dig.c:218 +#: plugins/check_dig.c:239 msgid "Server port must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:228 -msgid "Input causes overflow in warning interval" -msgstr "" - -#: plugins/check_dig.c:231 +#: plugins/check_dig.c:250 msgid "Warning interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:238 -msgid "Input causes overflow in critical interval" -msgstr "" - -#: plugins/check_dig.c:241 +#: plugins/check_dig.c:258 msgid "Critical interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:249 +#: plugins/check_dig.c:266 msgid "Time interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:301 plugins/urlize.c:132 +#: plugins/check_dig.c:324 plugins/urlize.c:132 msgid "" "Copyright (c) 2000 Karl DeBisschop \n" msgstr "" -#: plugins/check_dig.c:304 +#: plugins/check_dig.c:327 msgid "" "Test the DNS service on the specified host using dig\n" "\n" msgstr "" -#: plugins/check_dig.c:312 +#: plugins/check_dig.c:335 msgid "" " -l, --lookup=STRING\n" " machine name to lookup\n" msgstr "" -#: plugins/check_dig.c:331 +#: plugins/check_dig.c:339 +msgid "" +" -T, --record_type=STRING\n" +" record type to lookup (default: A)\n" +msgstr "" + +#: plugins/check_dig.c:343 +msgid "" +" -a, --expected_address=STRING\n" +" an address expected to be in the asnwer section.\n" +" if not set, uses whatever was in -l\n" +msgstr "" + +#: plugins/check_dig.c:363 #, c-format msgid "" -"Usage: %s -H host -l lookup [-p ] [-w ]\n" -" [-c ] [-t ] [-v]\n" +"Usage: %s -H host -l lookup [-p ] [-T ]\n" +" [-w ] [-c ] [-t ]\n" +" [-a ] [-v]\n" msgstr "" -#: plugins/check_disk.c:212 +#: plugins/check_disk.c:213 #, c-format msgid "" "%s\n" @@ -257,70 +280,70 @@ msgid "" "lu warn%%:%.0f%% crit%%:%.0f%%" msgstr "" -#: plugins/check_disk.c:230 +#: plugins/check_disk.c:231 #, c-format msgid "%s [%s not found]" msgstr "" -#: plugins/check_disk.c:306 +#: plugins/check_disk.c:307 msgid "Timeout Interval must be an integer!\n" msgstr "" -#: plugins/check_disk.c:323 plugins/check_swap.c:292 +#: plugins/check_disk.c:324 plugins/check_swap.c:391 msgid "Warning threshold must be integer or percentage!\n" msgstr "" -#: plugins/check_disk.c:340 plugins/check_swap.c:309 +#: plugins/check_disk.c:341 plugins/check_swap.c:408 msgid "Critical threshold must be integer or percentage!\n" msgstr "" -#: plugins/check_disk.c:361 +#: plugins/check_disk.c:362 #, c-format msgid "unit type %s not known\n" msgstr "" -#: plugins/check_disk.c:364 +#: plugins/check_disk.c:365 #, c-format msgid "failed allocating storage for '%s'\n" msgstr "" -#: plugins/check_disk.c:431 +#: plugins/check_disk.c:440 msgid "check_disk: unrecognized option\n" msgstr "" -#: plugins/check_disk.c:488 +#: plugins/check_disk.c:497 msgid "INPUT ERROR: No thresholds specified" msgstr "" -#: plugins/check_disk.c:494 +#: plugins/check_disk.c:503 #, c-format msgid "" "INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be " "between zero and 100 percent, inclusive" msgstr "" -#: plugins/check_disk.c:501 +#: plugins/check_disk.c:510 #, c-format msgid "" "INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " "greater than zero" msgstr "" -#: plugins/check_disk.c:566 plugins/check_dns.c:406 plugins/check_dummy.c:84 -#: plugins/check_hpjd.c:381 plugins/check_http.c:1103 plugins/check_mrtg.c:307 -#: plugins/check_mrtgtraf.c:325 plugins/check_nwstat.c:903 -#: plugins/check_overcr.c:423 plugins/check_tcp.c:596 +#: plugins/check_disk.c:575 plugins/check_dns.c:394 plugins/check_dummy.c:89 +#: plugins/check_hpjd.c:381 plugins/check_http.c:1113 plugins/check_mrtg.c:311 +#: plugins/check_mrtgtraf.c:323 plugins/check_nwstat.c:909 +#: plugins/check_overcr.c:423 plugins/check_tcp.c:600 msgid "Copyright (c) 1999 Ethan Galstad \n" msgstr "" -#: plugins/check_disk.c:569 +#: plugins/check_disk.c:578 msgid "" "This plugin checks the amount of used disk space on a mounted file system\n" "and generates an alert if free space is less than one of the threshold " "values." msgstr "" -#: plugins/check_disk.c:577 +#: plugins/check_disk.c:586 #, c-format msgid "" " -w, --warning=INTEGER\n" @@ -336,7 +359,7 @@ msgid "" " Clear thresholds\n" msgstr "" -#: plugins/check_disk.c:589 +#: plugins/check_disk.c:598 msgid "" " -u, --units=STRING\n" " Choose bytes, kB, MB, GB, TB (default: MB)\n" @@ -346,7 +369,7 @@ msgid "" " Same as '--units MB'\n" msgstr "" -#: plugins/check_disk.c:597 +#: plugins/check_disk.c:606 msgid "" " -l, --local\n" " Only check local filesystems\n" @@ -362,14 +385,14 @@ msgid "" " Display only devices/mountpoints with errors\n" msgstr "" -#: plugins/check_disk.c:617 +#: plugins/check_disk.c:626 msgid "" "Examples:\n" " check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /\n" " Checks /tmp and /var at 10%,5% and / at 100MB, 50MB\n" msgstr "" -#: plugins/check_disk.c:630 +#: plugins/check_disk.c:639 #, c-format msgid "" "Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n" @@ -378,114 +401,135 @@ msgid "" " %s (-V|--version)\n" msgstr "" -#: plugins/check_dns.c:129 plugins/check_dns.c:158 +#: plugins/check_dns.c:108 msgid "Unknown error (plugin)" msgstr "" -#: plugins/check_dns.c:153 +#: plugins/check_dns.c:128 #, c-format msgid "DNS CRITICAL - '%s' returned empty host name string\n" msgstr "" -#: plugins/check_dns.c:190 +#: plugins/check_dns.c:167 msgid "nslookup returned error status" msgstr "" -#: plugins/check_dns.c:197 +#: plugins/check_dns.c:174 #, c-format msgid "DNS CRITICAL - '%s' output parsing exited with no address\n" msgstr "" -#: plugins/check_dns.c:203 +#: plugins/check_dns.c:180 #, c-format msgid "expected %s but got %s" msgstr "" -#: plugins/check_dns.c:215 +#: plugins/check_dns.c:186 #, c-format -msgid "DNS ok - %.3f seconds response time, address%s %s|%s\n" +msgid "server %s is not authoritative for %s" +msgstr "" + +#: plugins/check_dns.c:198 +msgid "DNS" msgstr "" -#: plugins/check_dns.c:220 +#: plugins/check_dns.c:198 plugins/check_dummy.c:58 plugins/check_http.c:678 +#: plugins/check_http.c:928 plugins/check_procs.c:263 +msgid "OK" +msgstr "" + +#: plugins/check_dns.c:199 +#, c-format +msgid "%.3f second response time, " +msgid_plural "%.3f seconds response time, " +msgstr[0] "" +msgstr[1] "" + +#: plugins/check_dns.c:200 +#, c-format +msgid "%s returns %s" +msgstr "" + +#: plugins/check_dns.c:204 #, c-format msgid "DNS WARNING - %s\n" msgstr "" -#: plugins/check_dns.c:223 +#: plugins/check_dns.c:207 #, c-format msgid "DNS CRITICAL - %s\n" msgstr "" -#: plugins/check_dns.c:226 +#: plugins/check_dns.c:210 #, c-format msgid "DNS problem - %s\n" msgstr "" -#: plugins/check_dns.c:244 +#: plugins/check_dns.c:228 #, c-format msgid "No response from name server %s\n" msgstr "" -#: plugins/check_dns.c:248 +#: plugins/check_dns.c:232 #, c-format msgid "Name server %s has no records\n" msgstr "" -#: plugins/check_dns.c:255 +#: plugins/check_dns.c:239 #, c-format msgid "Connection to name server %s was refused\n" msgstr "" -#: plugins/check_dns.c:261 +#: plugins/check_dns.c:245 #, c-format msgid "Domain %s was not found by the server\n" msgstr "" -#: plugins/check_dns.c:265 +#: plugins/check_dns.c:249 msgid "Network is unreachable\n" msgstr "" -#: plugins/check_dns.c:269 +#: plugins/check_dns.c:253 #, c-format msgid "Server failure for %s\n" msgstr "" -#: plugins/check_dns.c:314 plugins/check_fping.c:243 plugins/check_game.c:210 -#: plugins/check_overcr.c:335 plugins/check_radius.c:213 -#: plugins/check_tcp.c:402 plugins/check_udp.c:147 plugins/check_users.c:134 +#: plugins/check_dns.c:299 plugins/check_fping.c:243 plugins/check_game.c:210 +#: plugins/check_overcr.c:335 plugins/check_radius.c:216 +#: plugins/check_tcp.c:406 plugins/check_udp.c:147 plugins/check_users.c:143 #, c-format msgid "" "%s: Unknown argument: %s\n" "\n" msgstr "" -#: plugins/check_dns.c:331 plugins/check_dns.c:343 plugins/check_dns.c:354 -#: plugins/check_dns.c:359 plugins/check_dns.c:369 plugins/check_dns.c:380 +#: plugins/check_dns.c:316 plugins/check_dns.c:328 plugins/check_dns.c:339 +#: plugins/check_dns.c:344 plugins/check_dns.c:357 plugins/check_dns.c:368 #: plugins/check_game.c:227 plugins/check_game.c:235 msgid "Input buffer overflow\n" msgstr "" -#: plugins/check_dns.c:338 +#: plugins/check_dns.c:323 msgid "" "Invalid server name/address\n" "\n" msgstr "" -#: plugins/check_dns.c:349 plugins/check_fping.c:257 -#: plugins/check_radius.c:227 +#: plugins/check_dns.c:334 plugins/check_fping.c:257 +#: plugins/check_radius.c:230 msgid "" "Invalid host name/address\n" "\n" msgstr "" -#: plugins/check_dns.c:376 +#: plugins/check_dns.c:364 #, c-format msgid "" "Invalid name/address: %s\n" "\n" msgstr "" -#: plugins/check_dns.c:413 +#: plugins/check_dns.c:401 msgid "" "-H, --hostname=HOST\n" " The name or address you want to query\n" @@ -493,9 +537,11 @@ msgid "" " Optional DNS server you want to use for the lookup\n" "-a, --expected-address=IP-ADDRESS\n" " Optional IP address you expect the DNS server to return\n" +"-A, --expect-authority\n" +" Optionally expect the DNS server to be authoritative for the lookup\n" msgstr "" -#: plugins/check_dns.c:423 +#: plugins/check_dns.c:413 msgid "" "\n" "This plugin uses the nslookup program to obtain the IP address\n" @@ -504,10 +550,10 @@ msgid "" "specified in /etc/resolv.conf will be used.\n" msgstr "" -#: plugins/check_dns.c:438 +#: plugins/check_dns.c:428 #, c-format msgid "" -"Usage: %s -H host [-s server] [-a expected-address] [-t timeout]\n" +"Usage: %s -H host [-s server] [-a expected-address] [-A] [-t timeout]\n" " %s --help\n" " %s --version\n" msgstr "" @@ -520,16 +566,33 @@ msgstr "" msgid "Arguments to check_dummy must be an integer\n" msgstr "" -#: plugins/check_dummy.c:91 +#: plugins/check_dummy.c:61 plugins/check_http.c:680 plugins/check_procs.c:265 +msgid "WARNING" +msgstr "" + +#: plugins/check_dummy.c:64 plugins/check_http.c:682 plugins/check_procs.c:270 +msgid "CRITICAL" +msgstr "" + +#: plugins/check_dummy.c:67 plugins/check_http.c:676 +msgid "UNKNOWN" +msgstr "" + +#: plugins/check_dummy.c:70 +#, c-format +msgid "Status %d is not a supported error state\n" +msgstr "" + +#: plugins/check_dummy.c:96 msgid "" "\n" "This plugin will simply return the state corresponding to the numeric value\n" -"of the argument.\n" +"of the argument with optional text.\n" msgstr "" -#: plugins/check_dummy.c:103 +#: plugins/check_dummy.c:108 #, c-format -msgid "Usage: %s \n" +msgid "Usage: %s [optional text]\n" msgstr "" #: plugins/check_fping.c:83 @@ -685,8 +748,8 @@ msgid "" msgstr "" #: plugins/check_hpjd.c:87 plugins/check_mrtg.c:61 plugins/check_mrtgtraf.c:67 -#: plugins/check_mysql.c:51 plugins/check_real.c:69 plugins/check_smtp.c:74 -#: plugins/check_swap.c:78 plugins/check_time.c:63 +#: plugins/check_mysql.c:51 plugins/check_real.c:69 plugins/check_smtp.c:93 +#: plugins/check_swap.c:93 plugins/check_time.c:64 msgid "Invalid command arguments supplied\n" msgstr "" @@ -740,13 +803,13 @@ msgid "Printer ok - (%s)\n" msgstr "" #: plugins/check_hpjd.c:324 plugins/check_mysql.c:132 plugins/check_real.c:306 -#: plugins/check_smtp.c:236 +#: plugins/check_smtp.c:294 msgid "Invalid host name\n" msgstr "" -#: plugins/check_hpjd.c:337 plugins/check_load.c:230 plugins/check_mrtg.c:228 -#: plugins/check_mrtgtraf.c:264 plugins/check_mysql.c:154 -#: plugins/check_real.c:358 plugins/check_smtp.c:304 plugins/check_swap.c:324 +#: plugins/check_hpjd.c:337 plugins/check_load.c:230 plugins/check_mrtg.c:232 +#: plugins/check_mrtgtraf.c:262 plugins/check_mysql.c:154 +#: plugins/check_real.c:358 plugins/check_smtp.c:376 plugins/check_swap.c:423 msgid "Invalid argument\n" msgstr "" @@ -769,246 +832,230 @@ msgstr "" msgid "Usage: %s -H host [-C community]\n" msgstr "" -#: plugins/check_http.c:141 +#: plugins/check_http.c:142 msgid "check_http: could not parse arguments\n" msgstr "" -#: plugins/check_http.c:162 +#: plugins/check_http.c:163 msgid "HTTP CRITICAL - Could not make SSL connection\n" msgstr "" -#: plugins/check_http.c:168 plugins/check_http.c:495 +#: plugins/check_http.c:169 plugins/check_http.c:501 msgid "ERROR: Cannot retrieve server certificate.\n" msgstr "" -#: plugins/check_http.c:239 +#: plugins/check_http.c:242 msgid "unknown argument" msgstr "" -#: plugins/check_http.c:251 +#: plugins/check_http.c:254 msgid "timeout interval must be a non-negative integer" msgstr "" -#: plugins/check_http.c:257 +#: plugins/check_http.c:260 msgid "invalid critical threshold" msgstr "" -#: plugins/check_http.c:265 +#: plugins/check_http.c:268 msgid "invalid warning threshold" msgstr "" -#: plugins/check_http.c:279 plugins/check_http.c:294 +#: plugins/check_http.c:282 plugins/check_http.c:297 msgid "check_http: invalid option - SSL is not available\n" msgstr "" -#: plugins/check_http.c:288 +#: plugins/check_http.c:291 msgid "invalid certificate expiration period" msgstr "" -#: plugins/check_http.c:309 +#: plugins/check_http.c:312 #, c-format msgid "option f:%d \n" msgstr "" -#: plugins/check_http.c:324 +#: plugins/check_http.c:327 msgid "invalid port number" msgstr "" -#: plugins/check_http.c:352 +#: plugins/check_http.c:358 msgid "check_http: call for regex which was not a compiled option\n" msgstr "" -#: plugins/check_http.c:366 +#: plugins/check_http.c:372 #, c-format msgid "Could Not Compile Regular Expression: %s" msgstr "" -#: plugins/check_http.c:378 plugins/check_ldap.c:241 plugins/check_ping.c:222 -#: plugins/check_smtp.c:294 plugins/check_ssh.c:128 plugins/check_tcp.c:421 +#: plugins/check_http.c:384 plugins/check_ldap.c:241 plugins/check_ping.c:224 +#: plugins/check_smtp.c:366 plugins/check_ssh.c:128 plugins/check_tcp.c:425 msgid "IPv6 support not available\n" msgstr "" -#: plugins/check_http.c:400 +#: plugins/check_http.c:406 msgid "check_http: you must specify a server address or host name\n" msgstr "" -#: plugins/check_http.c:488 plugins/check_http.c:503 +#: plugins/check_http.c:494 plugins/check_http.c:509 msgid "Unable to open TCP socket\n" msgstr "" -#: plugins/check_http.c:561 +#: plugins/check_http.c:571 msgid "Client Certificate Required\n" msgstr "" -#: plugins/check_http.c:563 plugins/check_http.c:568 +#: plugins/check_http.c:573 plugins/check_http.c:578 msgid "Error in recv()\n" msgstr "" -#: plugins/check_http.c:576 +#: plugins/check_http.c:586 #, c-format msgid "No data received %s\n" msgstr "" -#: plugins/check_http.c:620 +#: plugins/check_http.c:630 msgid "Invalid HTTP response received from host\n" msgstr "" -#: plugins/check_http.c:623 +#: plugins/check_http.c:633 #, c-format msgid "Invalid HTTP response received from host on port %d\n" msgstr "" -#: plugins/check_http.c:631 +#: plugins/check_http.c:641 #, c-format msgid "HTTP OK: Status line output matched \"%s\"\n" msgstr "" -#: plugins/check_http.c:643 +#: plugins/check_http.c:653 #, c-format msgid "HTTP CRITICAL: Invalid Status Line (%s)\n" msgstr "" -#: plugins/check_http.c:650 +#: plugins/check_http.c:660 #, c-format msgid "HTTP CRITICAL: Invalid Status (%s)\n" msgstr "" -#: plugins/check_http.c:654 +#: plugins/check_http.c:664 #, c-format msgid "HTTP CRITICAL: %s\n" msgstr "" -#: plugins/check_http.c:658 +#: plugins/check_http.c:668 #, c-format msgid "HTTP WARNING: %s\n" msgstr "" -#: plugins/check_http.c:666 -msgid "UNKNOWN" -msgstr "" - -#: plugins/check_http.c:668 plugins/check_http.c:918 plugins/check_procs.c:249 -msgid "OK" -msgstr "" - -#: plugins/check_http.c:670 plugins/check_procs.c:251 -msgid "WARNING" -msgstr "" - -#: plugins/check_http.c:672 plugins/check_procs.c:256 -msgid "CRITICAL" -msgstr "" - -#: plugins/check_http.c:676 +#: plugins/check_http.c:686 #, c-format msgid " - %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:688 +#: plugins/check_http.c:698 #, c-format msgid "HTTP problem: %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:702 plugins/check_http.c:719 +#: plugins/check_http.c:712 plugins/check_http.c:729 #, c-format msgid "HTTP OK %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:709 +#: plugins/check_http.c:719 #, c-format msgid "CRITICAL - string not found%s|%s %s\n" msgstr "" -#: plugins/check_http.c:727 +#: plugins/check_http.c:737 #, c-format msgid "CRITICAL - pattern not found%s|%s %s\n" msgstr "" -#: plugins/check_http.c:734 +#: plugins/check_http.c:744 #, c-format msgid "CRITICAL - Execute Error: %s\n" msgstr "" -#: plugins/check_http.c:744 +#: plugins/check_http.c:754 #, c-format msgid "HTTP WARNING: page size %d too small%s|%s\n" msgstr "" -#: plugins/check_http.c:749 +#: plugins/check_http.c:759 #, c-format msgid "HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:785 +#: plugins/check_http.c:795 msgid "ERROR: could not allocate addr\n" msgstr "" -#: plugins/check_http.c:789 plugins/check_http.c:809 +#: plugins/check_http.c:799 plugins/check_http.c:819 msgid "ERROR: could not allocate url\n" msgstr "" -#: plugins/check_http.c:799 +#: plugins/check_http.c:809 #, c-format msgid "UNKNOWN - Could not find redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:852 +#: plugins/check_http.c:862 #, c-format msgid "UNKNOWN - Could not parse redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:862 +#: plugins/check_http.c:872 #, c-format msgid "WARNING - maximum redirection depth %d exceeded - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:870 +#: plugins/check_http.c:880 #, c-format msgid "WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:918 +#: plugins/check_http.c:928 #, c-format msgid "SSL seeding: %s\n" msgstr "" -#: plugins/check_http.c:918 +#: plugins/check_http.c:928 msgid "Failed" msgstr "" -#: plugins/check_http.c:925 +#: plugins/check_http.c:935 msgid "CRITICAL - Cannot create SSL context.\n" msgstr "" -#: plugins/check_http.c:949 +#: plugins/check_http.c:959 msgid "CRITICAL - Cannot initiate SSL handshake.\n" msgstr "" -#: plugins/check_http.c:977 plugins/check_http.c:989 +#: plugins/check_http.c:987 plugins/check_http.c:999 msgid "CRITICAL - Wrong time format in certificate.\n" msgstr "" -#: plugins/check_http.c:1018 +#: plugins/check_http.c:1028 #, c-format msgid "WARNING - Certificate expires in %d day(s) (%s).\n" msgstr "" -#: plugins/check_http.c:1022 +#: plugins/check_http.c:1032 #, c-format msgid "CRITICAL - Certificate expired on %s.\n" msgstr "" -#: plugins/check_http.c:1027 +#: plugins/check_http.c:1037 #, c-format msgid "WARNING - Certificate expires today (%s).\n" msgstr "" -#: plugins/check_http.c:1031 +#: plugins/check_http.c:1041 #, c-format msgid "OK - Certificate will expire on %s.\n" msgstr "" -#: plugins/check_http.c:1106 +#: plugins/check_http.c:1116 msgid "" "This plugin tests the HTTP service on the specified host. It can test\n" "normal (http) and secure (https) servers, follow redirects, search for\n" @@ -1016,11 +1063,11 @@ msgid "" "certificate expiration times.\n" msgstr "" -#: plugins/check_http.c:1114 +#: plugins/check_http.c:1124 msgid "NOTE: One or both of -H and -I must be specified\n" msgstr "" -#: plugins/check_http.c:1118 +#: plugins/check_http.c:1128 #, c-format msgid "" " -H, --hostname=ADDRESS\n" @@ -1032,7 +1079,7 @@ msgid "" " Port number (default: %d)\n" msgstr "" -#: plugins/check_http.c:1129 +#: plugins/check_http.c:1139 msgid "" " -S, --ssl\n" " Connect via SSL\n" @@ -1041,7 +1088,7 @@ msgid "" " (when this option is used the url is not checked.)\n" msgstr "" -#: plugins/check_http.c:1137 +#: plugins/check_http.c:1147 #, c-format msgid "" " -e, --expect=STRING\n" @@ -1054,9 +1101,11 @@ msgid "" " URL to GET or POST (default: /)\n" " -P, --post=STRING\n" " URL encoded http POST data\n" +" -T, --content-type=STRING\n" +" specify Content-Type header media type when POSTing\n" msgstr "" -#: plugins/check_http.c:1149 +#: plugins/check_http.c:1161 msgid "" " -l, --linespan\n" " Allow regex to span newlines (must precede -r or -R)\n" @@ -1066,7 +1115,7 @@ msgid "" " Search page for case-insensitive regex STRING\n" msgstr "" -#: plugins/check_http.c:1158 +#: plugins/check_http.c:1170 msgid "" " -a, --authorization=AUTH_PAIR\n" " Username:password on sites with basic authentication\n" @@ -1078,7 +1127,7 @@ msgid "" " Minimum page size required (bytes)\n" msgstr "" -#: plugins/check_http.c:1174 +#: plugins/check_http.c:1186 msgid "" "This plugin will attempt to open an HTTP connection with the host. " "Successful\n" @@ -1090,7 +1139,7 @@ msgid "" "(fully qualified domain name) as the [host_name] argument.\n" msgstr "" -#: plugins/check_http.c:1183 +#: plugins/check_http.c:1195 msgid "" "\n" "This plugin can also check whether an SSL enabled web server is able to\n" @@ -1098,7 +1147,7 @@ msgid "" "certificate is still valid for the specified number of days.\n" msgstr "" -#: plugins/check_http.c:1187 +#: plugins/check_http.c:1199 msgid "" "\n" "CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" @@ -1111,7 +1160,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_http.c:1194 +#: plugins/check_http.c:1206 msgid "" "CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" "\n" @@ -1124,7 +1173,7 @@ msgid "" "the certificate is expired.\n" msgstr "" -#: plugins/check_http.c:1212 +#: plugins/check_http.c:1224 #, c-format msgid "" "Usage: %s (-H | -I ) [-u ] [-p ]\n" @@ -1404,43 +1453,43 @@ msgstr "" msgid "Unable to process MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:123 plugins/check_mrtgtraf.c:121 +#: plugins/check_mrtg.c:123 plugins/check_mrtgtraf.c:120 #, c-format msgid "MRTG data has expired (%d minutes old)\n" msgstr "" -#: plugins/check_mrtg.c:143 -msgid "Ave" +#: plugins/check_mrtg.c:141 plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtgtraf.c:180 +msgid "Avg" msgstr "" -#: plugins/check_mrtg.c:143 plugins/check_mrtgtraf.c:175 -#: plugins/check_mrtgtraf.c:183 plugins/check_mrtgtraf.c:184 -#: plugins/check_mrtgtraf.c:189 plugins/check_mrtgtraf.c:190 +#: plugins/check_mrtg.c:141 plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtgtraf.c:180 msgid "Max" msgstr "" -#: plugins/check_mrtg.c:207 plugins/check_mrtg.c:259 +#: plugins/check_mrtg.c:211 plugins/check_mrtg.c:263 msgid "Invalid variable number\n" msgstr "" -#: plugins/check_mrtg.c:242 +#: plugins/check_mrtg.c:246 #, c-format msgid "" "%s is not a valid expiration time\n" "Use '%s -h' for additional help\n" msgstr "" -#: plugins/check_mrtg.c:286 +#: plugins/check_mrtg.c:290 msgid "You must supply the variable number\n" msgstr "" -#: plugins/check_mrtg.c:310 +#: plugins/check_mrtg.c:314 msgid "" "This plugin will check either the average or maximum value of one of the\n" "two variables recorded in an MRTG log file.\n" msgstr "" -#: plugins/check_mrtg.c:318 +#: plugins/check_mrtg.c:322 msgid "" " -F, --logfile=FILE\n" " The MRTG log file containing the data you want to monitor\n" @@ -1456,7 +1505,7 @@ msgid "" " Threshold value for data to result in CRITICAL status\n" msgstr "" -#: plugins/check_mrtg.c:332 +#: plugins/check_mrtg.c:336 #, c-format msgid "" " -l, --label=STRING\n" @@ -1466,7 +1515,7 @@ msgid "" " \"Bytes Per Second\", \"%% Utilization\")\n" msgstr "" -#: plugins/check_mrtg.c:339 +#: plugins/check_mrtg.c:343 msgid "" "If the value exceeds the threshold, a WARNING status is returned. If\n" "the value exceeds the threshold, a CRITICAL status is returned. If\n" @@ -1475,7 +1524,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtg.c:345 +#: plugins/check_mrtg.c:349 msgid "" "This plugin is useful for monitoring MRTG data that does not correspond to\n" "bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth).\n" @@ -1487,7 +1536,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtg.c:352 +#: plugins/check_mrtg.c:356 msgid "" "Notes:\n" "- This plugin only monitors one of the two variables stored in the MRTG log\n" @@ -1499,40 +1548,24 @@ msgid "" " http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" msgstr "" -#: plugins/check_mrtg.c:372 +#: plugins/check_mrtg.c:376 #, c-format msgid "" "Usage: %s -F log_file -a -v variable -w warning -c critical\n" " [-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n" msgstr "" -#: plugins/check_mrtgtraf.c:174 +#: plugins/check_mrtgtraf.c:178 #, c-format -msgid "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s" +msgid "%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:175 plugins/check_mrtgtraf.c:183 -#: plugins/check_mrtgtraf.c:184 plugins/check_mrtgtraf.c:189 -#: plugins/check_mrtgtraf.c:190 -msgid "Avg" -msgstr "" - -#: plugins/check_mrtgtraf.c:182 -#, c-format -msgid "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s" -msgstr "" - -#: plugins/check_mrtgtraf.c:188 +#: plugins/check_mrtgtraf.c:191 #, c-format -msgid "Traffic OK - %s. In = %0.1f %s, %s. Out = %0.1f %s\n" +msgid "Traffic %s - %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:193 -#, c-format -msgid "UNKNOWN %s\n" -msgstr "" - -#: plugins/check_mrtgtraf.c:332 +#: plugins/check_mrtgtraf.c:330 msgid "" " -F, --filename=STRING\n" " File to read log from\n" @@ -1546,7 +1579,7 @@ msgid "" " Critical threshold pair \",\"\n" msgstr "" -#: plugins/check_mrtgtraf.c:344 +#: plugins/check_mrtgtraf.c:342 msgid "" "\n" "This plugin will check the incoming/outgoing transfer rates of a router,\n" @@ -1558,7 +1591,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtgtraf.c:352 +#: plugins/check_mrtgtraf.c:350 msgid "" "Notes:\n" "- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n" @@ -1570,7 +1603,7 @@ msgid "" " for future enhancements of this plugin.\n" msgstr "" -#: plugins/check_mrtgtraf.c:370 +#: plugins/check_mrtgtraf.c:368 #, c-format msgid "" "Usage: %s -F -a -v -w -c " @@ -1607,53 +1640,53 @@ msgstr "" msgid "Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password]\n" msgstr "" -#: plugins/check_nagios.c:78 +#: plugins/check_nagios.c:81 msgid "Error: Cannot open status log for reading!\n" msgstr "" -#: plugins/check_nagios.c:116 +#: plugins/check_nagios.c:138 #, c-format -msgid "Found process: %s\n" +msgid "Found process: %s %s\n" msgstr "" -#: plugins/check_nagios.c:136 +#: plugins/check_nagios.c:159 msgid "Could not locate a running Nagios process!\n" msgstr "" -#: plugins/check_nagios.c:147 +#: plugins/check_nagios.c:170 #, c-format msgid "Nagios %s: located %d process%s, status log updated %d second%s ago\n" msgstr "" -#: plugins/check_nagios.c:186 plugins/check_nagios.c:220 +#: plugins/check_nagios.c:209 plugins/check_nagios.c:243 #, c-format msgid "" "Expiration time must be an integer (seconds)\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:200 +#: plugins/check_nagios.c:223 #, c-format msgid "" "%s: Unknown argument: %c\n" "\n" msgstr "" -#: plugins/check_nagios.c:232 +#: plugins/check_nagios.c:255 #, c-format msgid "" "You must provide the status_log\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:236 +#: plugins/check_nagios.c:259 #, c-format msgid "" "You must provide a process string\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:254 +#: plugins/check_nagios.c:277 msgid "" "This plugin attempts to check the status of the Nagios process on the local\n" "machine. The plugin will check to make sure the Nagios status log is no " @@ -1665,7 +1698,7 @@ msgid "" "by the argument.\n" msgstr "" -#: plugins/check_nagios.c:265 +#: plugins/check_nagios.c:288 msgid "" "-F, --filename=FILE\n" " Name of the log file to check\n" @@ -1675,90 +1708,125 @@ msgid "" " Command to search for in process table\n" msgstr "" -#: plugins/check_nagios.c:273 +#: plugins/check_nagios.c:296 msgid "" "Example:\n" " ./check_nagios -e 5 \\ -F /usr/local/nagios/var/status.log \\ -C /usr/" "local/nagios/bin/nagios\n" msgstr "" -#: plugins/check_nagios.c:286 +#: plugins/check_nagios.c:309 #, c-format msgid "" "Usage: %s -F -e -C \n" msgstr "" -#: plugins/check_nt.c:118 +#: plugins/check_nt.c:127 #, c-format msgid "Wrong client version - running: %s, required: %s" msgstr "" -#: plugins/check_nt.c:129 plugins/check_nt.c:182 +#: plugins/check_nt.c:138 plugins/check_nt.c:198 msgid "missing -l parameters" msgstr "" -#: plugins/check_nt.c:131 +#: plugins/check_nt.c:140 msgid "wrong -l parameter." msgstr "" -#: plugins/check_nt.c:135 +#: plugins/check_nt.c:144 msgid "CPU Load" msgstr "" -#: plugins/check_nt.c:156 +#: plugins/check_nt.c:145 +msgid " " +msgstr "" + +#: plugins/check_nt.c:167 #, c-format msgid " %lu%% (%lu min average)" msgstr "" -#: plugins/check_nt.c:163 +#: plugins/check_nt.c:169 +#, c-format +msgid " '%lu min avg Load'=%lu%%;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nt.c:179 msgid "not enough values for -l parameters" msgstr "" -#: plugins/check_nt.c:175 +#: plugins/check_nt.c:191 #, c-format msgid "System Uptime : %u day(s) %u hour(s) %u minute(s)" msgstr "" -#: plugins/check_nt.c:184 +#: plugins/check_nt.c:200 msgid "wrong -l argument" msgstr "" -#: plugins/check_nt.c:193 +#: plugins/check_nt.c:211 #, c-format msgid "%s:\\ - total: %.2f Gb - used: %.2f Gb (%.0f%%) - free %.2f Gb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:208 +#: plugins/check_nt.c:214 +#, c-format +msgid "'%s:\\ Used Space'=%.2fGb;%.2f;%.2f;0.00;%.2f" +msgstr "" + +#: plugins/check_nt.c:228 msgid "Free disk space : Invalid drive " msgstr "" -#: plugins/check_nt.c:218 +#: plugins/check_nt.c:238 msgid "No service/process specified" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:242 msgid "ShowAll" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:242 msgid "ShowFail" msgstr "" -#: plugins/check_nt.c:237 +#: plugins/check_nt.c:262 #, c-format msgid "" "Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:253 plugins/check_nt.c:289 +#: plugins/check_nt.c:265 +#, c-format +msgid "'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f" +msgstr "" + +#: plugins/check_nt.c:301 plugins/check_nt.c:383 msgid "No counter specified" msgstr "" #: plugins/check_nt.c:319 +msgid "%" +msgstr "" + +#: plugins/check_nt.c:334 +msgid "Minimum value contains non-numbers" +msgstr "" + +#: plugins/check_nt.c:338 +msgid "Maximum value contains non-numbers" +msgstr "" + +#: plugins/check_nt.c:345 +msgid "No unit counter specified" +msgstr "" + +#: plugins/check_nt.c:413 msgid "Please specify a variable to check" msgstr "" -#: plugins/check_nt.c:404 plugins/check_nwstat.c:775 +#: plugins/check_nt.c:500 plugins/check_nwstat.c:781 #: plugins/check_overcr.c:352 #, c-format msgid "" @@ -1766,11 +1834,11 @@ msgid "" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nt.c:457 +#: plugins/check_nt.c:553 msgid "None" msgstr "" -#: plugins/check_nt.c:516 +#: plugins/check_nt.c:612 msgid "" "Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n" "\n" @@ -1779,7 +1847,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_nt.c:521 +#: plugins/check_nt.c:617 #, c-format msgid "" "\n" @@ -1802,19 +1870,19 @@ msgid "" " Print version information\n" msgstr "" -#: plugins/check_nt.c:539 +#: plugins/check_nt.c:635 msgid "" "-v, --variable=STRING\n" " Variable to check. Valid variables are:\n" msgstr "" -#: plugins/check_nt.c:542 +#: plugins/check_nt.c:638 msgid "" " CLIENTVERSION = Get the NSClient version\n" " If -l is specified, will return warning if versions differ.\n" msgstr "" -#: plugins/check_nt.c:545 +#: plugins/check_nt.c:641 msgid "" " CPULOAD = Average CPU load on last x minutes.\n" " Request a -l parameter with the following syntax:\n" @@ -1825,26 +1893,26 @@ msgid "" " ie: -l 60,90,95,120,90,95\n" msgstr "" -#: plugins/check_nt.c:552 +#: plugins/check_nt.c:648 msgid "" " UPTIME = Get the uptime of the machine.\n" " No specific parameters. No warning or critical threshold\n" msgstr "" -#: plugins/check_nt.c:555 +#: plugins/check_nt.c:651 msgid "" " USEDDISKSPACE = Size and percentage of disk use.\n" " Request a -l parameter containing the drive letter only.\n" " Warning and critical thresholds can be specified with -w and -c.\n" msgstr "" -#: plugins/check_nt.c:559 +#: plugins/check_nt.c:655 msgid "" " MEMUSE = Memory use.\n" " Warning and critical thresholds can be specified with -w and -c.\n" msgstr "" -#: plugins/check_nt.c:562 +#: plugins/check_nt.c:658 msgid "" " SERVICESTATE = Check the state of one or several services.\n" " Request a -l parameters with the following syntax:\n" @@ -1853,13 +1921,13 @@ msgid "" "\t\t in the returned string.\n" msgstr "" -#: plugins/check_nt.c:568 +#: plugins/check_nt.c:664 msgid "" " PROCSTATE = Check if one or several process are running.\n" " Same syntax as SERVICESTATE.\n" msgstr "" -#: plugins/check_nt.c:571 +#: plugins/check_nt.c:667 #, c-format msgid "" " COUNTER = Check any performance counter of Windows NT/2000.\n" @@ -1872,7 +1940,7 @@ msgid "" " \"%%.f %%%% paging file used.\"\n" msgstr "" -#: plugins/check_nt.c:580 +#: plugins/check_nt.c:676 msgid "" "Notes:\n" " - The NSClient service should be running on the server to get any " @@ -1881,191 +1949,191 @@ msgid "" " - Critical thresholds should be lower than warning thresholds\n" msgstr "" -#: plugins/check_nt.c:591 +#: plugins/check_nt.c:687 #, c-format msgid "" "Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n" " [-l params] [-d SHOWALL] [-t timeout]\n" msgstr "" -#: plugins/check_nwstat.c:143 +#: plugins/check_nwstat.c:147 #, c-format msgid "NetWare %s: " msgstr "" -#: plugins/check_nwstat.c:174 +#: plugins/check_nwstat.c:178 #, c-format msgid "Up %s," msgstr "" -#: plugins/check_nwstat.c:182 +#: plugins/check_nwstat.c:186 #, c-format msgid "Load %s - %s %s-min load average = %lu%%" msgstr "" -#: plugins/check_nwstat.c:203 +#: plugins/check_nwstat.c:207 #, c-format msgid "Conns %s - %lu current connections" msgstr "" -#: plugins/check_nwstat.c:222 +#: plugins/check_nwstat.c:226 #, c-format msgid "%s: Long term cache hits = %lu%%" msgstr "" -#: plugins/check_nwstat.c:241 +#: plugins/check_nwstat.c:245 #, c-format msgid "%s: Total cache buffers = %lu" msgstr "" -#: plugins/check_nwstat.c:260 +#: plugins/check_nwstat.c:264 #, c-format msgid "%s: Dirty cache buffers = %lu" msgstr "" -#: plugins/check_nwstat.c:279 +#: plugins/check_nwstat.c:283 #, c-format msgid "%s: LRU sitting time = %lu minutes" msgstr "" -#: plugins/check_nwstat.c:293 plugins/check_nwstat.c:318 -#: plugins/check_nwstat.c:438 plugins/check_nwstat.c:459 -#: plugins/check_nwstat.c:491 plugins/check_nwstat.c:512 +#: plugins/check_nwstat.c:297 plugins/check_nwstat.c:322 +#: plugins/check_nwstat.c:442 plugins/check_nwstat.c:463 +#: plugins/check_nwstat.c:495 plugins/check_nwstat.c:516 #, c-format msgid "Error: Volume '%s' does not exist!" msgstr "" -#: plugins/check_nwstat.c:302 +#: plugins/check_nwstat.c:306 #, c-format msgid "%s%lu KB free on volume %s" msgstr "" -#: plugins/check_nwstat.c:303 plugins/check_nwstat.c:446 -#: plugins/check_nwstat.c:499 +#: plugins/check_nwstat.c:307 plugins/check_nwstat.c:450 +#: plugins/check_nwstat.c:503 msgid "Only " msgstr "" -#: plugins/check_nwstat.c:338 +#: plugins/check_nwstat.c:342 #, c-format msgid "%lu MB (%lu%%) free on volume %s" msgstr "" -#: plugins/check_nwstat.c:357 +#: plugins/check_nwstat.c:361 #, c-format msgid "Directory Services Database is %s (DS version %s)" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 #, c-format msgid "Logins are %s" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 msgid "enabled" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 msgid "disabled" msgstr "" -#: plugins/check_nwstat.c:404 +#: plugins/check_nwstat.c:408 #, c-format msgid "%lu of %lu (%lu%%) packet receive buffers used" msgstr "" -#: plugins/check_nwstat.c:425 +#: plugins/check_nwstat.c:429 #, c-format msgid "%lu entries in SAP table" msgstr "" -#: plugins/check_nwstat.c:427 +#: plugins/check_nwstat.c:431 #, c-format msgid "%lu entries in SAP table for SAP type %d" msgstr "" -#: plugins/check_nwstat.c:446 +#: plugins/check_nwstat.c:450 #, c-format msgid "%s%lu KB purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:479 +#: plugins/check_nwstat.c:483 #, c-format msgid "%lu MB (%lu%%) purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:499 +#: plugins/check_nwstat.c:503 #, c-format msgid "%s%lu KB not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:532 +#: plugins/check_nwstat.c:536 #, c-format msgid "%lu MB (%lu%%) not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:550 +#: plugins/check_nwstat.c:554 #, c-format msgid "%lu open files" msgstr "" -#: plugins/check_nwstat.c:567 +#: plugins/check_nwstat.c:571 #, c-format msgid "%lu abended threads" msgstr "" -#: plugins/check_nwstat.c:592 +#: plugins/check_nwstat.c:596 #, c-format msgid "%lu current service processes (%lu max)" msgstr "" -#: plugins/check_nwstat.c:608 +#: plugins/check_nwstat.c:612 msgid "Critical: Time not in sync with network!" msgstr "" -#: plugins/check_nwstat.c:611 +#: plugins/check_nwstat.c:615 msgid "OK! Time in sync with network!" msgstr "" -#: plugins/check_nwstat.c:627 +#: plugins/check_nwstat.c:631 #, c-format msgid "LRU sitting time = %lu seconds" msgstr "" -#: plugins/check_nwstat.c:643 +#: plugins/check_nwstat.c:647 #, c-format msgid "dirty cache buffers = %lu%% of the total" msgstr "" -#: plugins/check_nwstat.c:658 +#: plugins/check_nwstat.c:662 #, c-format msgid "total cache buffers = %lu%% of the original" msgstr "" -#: plugins/check_nwstat.c:668 +#: plugins/check_nwstat.c:672 #, c-format msgid "NDS Version %s" msgstr "" -#: plugins/check_nwstat.c:677 +#: plugins/check_nwstat.c:681 #, c-format msgid "Up %s" msgstr "" -#: plugins/check_nwstat.c:687 +#: plugins/check_nwstat.c:691 #, c-format msgid "Module %s version %s is loaded" msgstr "" -#: plugins/check_nwstat.c:690 +#: plugins/check_nwstat.c:694 #, c-format msgid "Module %s is not loaded" msgstr "" -#: plugins/check_nwstat.c:695 plugins/check_overcr.c:270 +#: plugins/check_nwstat.c:699 plugins/check_overcr.c:270 msgid "Nothing to check!\n" msgstr "" -#: plugins/check_nwstat.c:906 +#: plugins/check_nwstat.c:912 #, c-format msgid "" "Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n" @@ -2073,7 +2141,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_nwstat.c:917 +#: plugins/check_nwstat.c:923 msgid "" " -v, --variable=STRING\n" " Variable to check. Valid variables include:\n" @@ -2085,7 +2153,7 @@ msgid "" " UPTIME = server uptime\n" msgstr "" -#: plugins/check_nwstat.c:927 +#: plugins/check_nwstat.c:933 msgid "" " LTCH = percent long term cache hits\n" " CBUFF = current number of cache buffers\n" @@ -2094,7 +2162,7 @@ msgid "" " TCB = dirty cache buffers as a percentage of the original\n" msgstr "" -#: plugins/check_nwstat.c:934 +#: plugins/check_nwstat.c:940 msgid "" " OFILES = number of open files\n" " VPF = percent free space on volume \n" @@ -2105,7 +2173,7 @@ msgid "" " VKNP = KB of not yet purgeable space on volume \n" msgstr "" -#: plugins/check_nwstat.c:943 +#: plugins/check_nwstat.c:949 msgid "" " LRUM = LRU sitting time in minutes\n" " LRUS = LRU sitting time in seconds\n" @@ -2117,7 +2185,7 @@ msgid "" " SAPENTRIES = number of entries in the SAP table for SAP type \n" msgstr "" -#: plugins/check_nwstat.c:953 +#: plugins/check_nwstat.c:959 msgid "" " TSYNC = timesync status \n" " LOGINS = check to see if logins are enabled\n" @@ -2126,7 +2194,7 @@ msgid "" " (e.g. \"NLM:TSANDS.NLM\")\n" msgstr "" -#: plugins/check_nwstat.c:960 +#: plugins/check_nwstat.c:966 msgid "" " -w, --warning=INTEGER\n" " Threshold which will result in a warning status\n" @@ -2136,7 +2204,7 @@ msgid "" " Include server version string in results\n" msgstr "" -#: plugins/check_nwstat.c:970 +#: plugins/check_nwstat.c:976 msgid "" "\n" "Notes:\n" @@ -2148,7 +2216,7 @@ msgid "" " TCB, LRUS and LRUM.\n" msgstr "" -#: plugins/check_nwstat.c:987 +#: plugins/check_nwstat.c:993 #, c-format msgid "" "Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n" @@ -2265,182 +2333,172 @@ msgstr "" msgid "PGSQL: CRITICAL - no connection to '%s' (%s).\n" msgstr "" -#: plugins/check_pgsql.c:161 +#: plugins/check_pgsql.c:169 #, c-format -msgid "PGSQL: CRITICAL - database %s (%d sec.)\n" +msgid "PGSQL: %s - database %s (%d sec.)|%s\n" msgstr "" -#: plugins/check_pgsql.c:167 -#, c-format -msgid "PGSQL: WARNING - database %s (%d sec.)\n" -msgstr "" - -#: plugins/check_pgsql.c:172 -#, c-format -msgid "PGSQL: ok - database %s (%d sec.)\n" -msgstr "" - -#: plugins/check_pgsql.c:220 plugins/check_snmp.c:449 plugins/negate.c:183 +#: plugins/check_pgsql.c:219 plugins/check_snmp.c:449 plugins/negate.c:183 msgid "Timeout Interval must be an integer" msgstr "" -#: plugins/check_pgsql.c:226 plugins/check_pgsql.c:232 +#: plugins/check_pgsql.c:225 plugins/check_pgsql.c:231 msgid "Invalid critical threshold" msgstr "" -#: plugins/check_pgsql.c:238 +#: plugins/check_pgsql.c:237 msgid "You gave an invalid host name" msgstr "" -#: plugins/check_pgsql.c:244 +#: plugins/check_pgsql.c:243 msgid "Port must be an integer" msgstr "" -#: plugins/check_pgsql.c:250 +#: plugins/check_pgsql.c:249 msgid "Database name is not valid" msgstr "" -#: plugins/check_pgsql.c:256 +#: plugins/check_pgsql.c:255 msgid "user name is not valid" msgstr "" -#: plugins/check_pgsql.c:390 +#: plugins/check_pgsql.c:389 msgid "" "Test whether a PostgreSQL DBMS is accepting connections.\n" "\n" msgstr "" -#: plugins/check_ping.c:80 +#: plugins/check_ping.c:82 msgid "Could not parse arguments" msgstr "" -#: plugins/check_ping.c:123 +#: plugins/check_ping.c:124 msgid "Error: Could not interpret output from ping command\n" msgstr "" -#: plugins/check_ping.c:139 +#: plugins/check_ping.c:140 #, c-format msgid "PING %s - %sPacket loss = %d%%" msgstr "" -#: plugins/check_ping.c:142 +#: plugins/check_ping.c:143 #, c-format msgid "PING %s - %sPacket loss = %d%%, RTA = %2.2f ms" msgstr "" -#: plugins/check_ping.c:233 +#: plugins/check_ping.c:235 msgid "Could not realloc() addresses\n" msgstr "" -#: plugins/check_ping.c:248 plugins/check_ping.c:328 +#: plugins/check_ping.c:250 plugins/check_ping.c:331 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:271 +#: plugins/check_ping.c:273 #, c-format msgid "" "Invalid host name/address: %s\n" "\n" msgstr "" -#: plugins/check_ping.c:282 +#: plugins/check_ping.c:285 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:293 +#: plugins/check_ping.c:296 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:304 +#: plugins/check_ping.c:307 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:315 +#: plugins/check_ping.c:318 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:346 +#: plugins/check_ping.c:349 #, c-format msgid "" "%s: Warning threshold must be integer or percentage!\n" "\n" msgstr "" -#: plugins/check_ping.c:357 +#: plugins/check_ping.c:360 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:361 +#: plugins/check_ping.c:364 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:365 +#: plugins/check_ping.c:368 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:369 +#: plugins/check_ping.c:372 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:373 +#: plugins/check_ping.c:376 #, c-format msgid " (%f) cannot be larger than (%f)\n" msgstr "" -#: plugins/check_ping.c:377 +#: plugins/check_ping.c:380 #, c-format msgid " (%d) cannot be larger than (%d)\n" msgstr "" -#: plugins/check_ping.c:390 +#: plugins/check_ping.c:393 msgid "Invalid host name/address" msgstr "" -#: plugins/check_ping.c:408 +#: plugins/check_ping.c:411 #, c-format msgid "Cannot open pipe: %s" msgstr "" -#: plugins/check_ping.c:412 +#: plugins/check_ping.c:415 #, c-format msgid "Cannot open stderr for %s\n" msgstr "" -#: plugins/check_ping.c:468 +#: plugins/check_ping.c:471 #, c-format msgid "PING CRITICAL - Network unreachable (%s)" msgstr "" -#: plugins/check_ping.c:470 +#: plugins/check_ping.c:473 #, c-format msgid "PING CRITICAL - Host Unreachable (%s)" msgstr "" -#: plugins/check_ping.c:472 +#: plugins/check_ping.c:475 #, c-format msgid "PING CRITICAL - Host not found (%s)" msgstr "" -#: plugins/check_ping.c:479 +#: plugins/check_ping.c:482 msgid "unable to realloc warn_text" msgstr "" -#: plugins/check_ping.c:505 plugins/check_procs.c:586 +#: plugins/check_ping.c:508 plugins/check_procs.c:582 msgid "Copyright (c) 1999 Ethan Galstad " msgstr "" -#: plugins/check_ping.c:508 +#: plugins/check_ping.c:511 msgid "" "Use ping to check connection statistics for a remote host.\n" "\n" msgstr "" -#: plugins/check_ping.c:516 +#: plugins/check_ping.c:519 #, c-format msgid "" "-H, --hostname=HOST\n" @@ -2455,7 +2513,7 @@ msgid "" " show HTML in the plugin output (obsoleted by urlize)\n" msgstr "" -#: plugins/check_ping.c:531 +#: plugins/check_ping.c:534 #, c-format msgid "" "THRESHOLD is ,%% where is the round trip average travel\n" @@ -2464,7 +2522,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ping.c:536 +#: plugins/check_ping.c:539 msgid "" "This plugin uses the ping command to probe the specified host for packet " "loss\n" @@ -2476,169 +2534,168 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:116 +#: plugins/check_procs.c:120 msgid "Unable to parse command line\n" msgstr "" -#: plugins/check_procs.c:119 +#: plugins/check_procs.c:123 #, c-format msgid "CMD: %s\n" msgstr "" -#: plugins/check_procs.c:215 +#: plugins/check_procs.c:229 #, c-format msgid "Not parseable: %s" msgstr "" -#: plugins/check_procs.c:222 +#: plugins/check_procs.c:236 #, c-format msgid "STDERR: %s" msgstr "" -#: plugins/check_procs.c:224 +#: plugins/check_procs.c:238 msgid "System call sent warnings to stderr\n" msgstr "" -#: plugins/check_procs.c:231 +#: plugins/check_procs.c:245 msgid "System call returned nonzero status\n" msgstr "" -#: plugins/check_procs.c:236 plugins/check_users.c:96 +#: plugins/check_procs.c:250 plugins/check_users.c:99 msgid "Unable to read output\n" msgstr "" -#: plugins/check_procs.c:253 +#: plugins/check_procs.c:267 #, c-format msgid "%d warn out of " msgstr "" -#: plugins/check_procs.c:258 +#: plugins/check_procs.c:272 #, c-format msgid "%d crit, %d warn out of " msgstr "" -#: plugins/check_procs.c:261 +#: plugins/check_procs.c:275 #, c-format msgid "%d process" msgid_plural "%d processes" msgstr[0] "" msgstr[1] "" -#: plugins/check_procs.c:264 +#: plugins/check_procs.c:278 #, c-format msgid " with %s" msgstr "" -#: plugins/check_procs.c:328 plugins/check_ssh.c:117 +#: plugins/check_procs.c:342 plugins/check_ssh.c:117 msgid "" "Timeout Interval must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:342 +#: plugins/check_procs.c:356 msgid "" "Critical Process Count must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:354 -#, c-format +#: plugins/check_procs.c:368 msgid "" -"%s: Warning Process Count must be an integer!\n" +"Warning Process Count must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:362 +#: plugins/check_procs.c:376 #, c-format msgid "" "%s: Parent Process ID must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:371 plugins/check_procs.c:484 +#: plugins/check_procs.c:382 plugins/check_procs.c:480 #, c-format msgid "%s%sSTATE = %s" msgstr "" -#: plugins/check_procs.c:380 +#: plugins/check_procs.c:391 #, c-format -msgid "UID %d was not found\n" +msgid "UID %s was not found\n" msgstr "" -#: plugins/check_procs.c:389 +#: plugins/check_procs.c:397 #, c-format msgid "User name %s was not found\n" msgstr "" -#: plugins/check_procs.c:397 +#: plugins/check_procs.c:402 #, c-format msgid "%s%sUID = %d (%s)" msgstr "" -#: plugins/check_procs.c:406 +#: plugins/check_procs.c:411 #, c-format msgid "%s%scommand name '%s'" msgstr "" -#: plugins/check_procs.c:415 +#: plugins/check_procs.c:420 #, c-format msgid "%s%sargs '%s'" msgstr "" -#: plugins/check_procs.c:420 +#: plugins/check_procs.c:425 #, c-format msgid "%s%sRSS >= %d" msgstr "" -#: plugins/check_procs.c:424 +#: plugins/check_procs.c:429 #, c-format msgid "" "%s: RSS must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:430 +#: plugins/check_procs.c:432 #, c-format msgid "%s%sVSZ >= %d" msgstr "" -#: plugins/check_procs.c:434 +#: plugins/check_procs.c:436 #, c-format msgid "" "%s: VSZ must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:441 +#: plugins/check_procs.c:440 #, c-format msgid "%s%sPCPU >= %.2f" msgstr "" -#: plugins/check_procs.c:445 +#: plugins/check_procs.c:444 #, c-format msgid "" "%s: PCPU must be a float!\n" "\n" msgstr "" -#: plugins/check_procs.c:467 +#: plugins/check_procs.c:463 #, c-format msgid "" "%s: metric must be one of PROCS, VSZ, RSS, CPU!\n" "\n" msgstr "" -#: plugins/check_procs.c:504 +#: plugins/check_procs.c:500 #, c-format msgid "wmax (%d) cannot be greater than cmax (%d)\n" msgstr "" -#: plugins/check_procs.c:508 +#: plugins/check_procs.c:504 #, c-format msgid "wmin (%d) cannot be less than cmin (%d)\n" msgstr "" -#: plugins/check_procs.c:589 +#: plugins/check_procs.c:585 msgid "" "Checks all processes and generates WARNING or CRITICAL states if the " "specified\n" @@ -2649,7 +2706,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:596 +#: plugins/check_procs.c:592 msgid "" "\n" "Required Arguments:\n" @@ -2659,7 +2716,7 @@ msgid "" " Generate critical state if metric is outside this range\n" msgstr "" -#: plugins/check_procs.c:603 +#: plugins/check_procs.c:599 msgid "" "\n" "Optional Arguments:\n" @@ -2673,7 +2730,7 @@ msgid "" " Extra information. Up to 3 verbosity levels\n" msgstr "" -#: plugins/check_procs.c:614 +#: plugins/check_procs.c:610 msgid "" "\n" "Optional Filters:\n" @@ -2689,7 +2746,7 @@ msgid "" " Only scan for processes with rss higher than indicated.\n" msgstr "" -#: plugins/check_procs.c:627 +#: plugins/check_procs.c:623 msgid "" " -P, --pcpu=PCPU\n" " Only scan for processes with pcpu higher than indicated.\n" @@ -2701,7 +2758,7 @@ msgid "" " Only scan for exact matches of COMMAND (without path).\n" msgstr "" -#: plugins/check_procs.c:637 +#: plugins/check_procs.c:633 msgid "" "\n" "RANGEs are specified 'min:max' or 'min:' or ':max' (or 'max'). If\n" @@ -2710,7 +2767,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:642 +#: plugins/check_procs.c:638 msgid "" "This plugin checks the number of currently running processes and\n" "generates WARNING or CRITICAL states if the process count is outside\n" @@ -2720,7 +2777,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:649 +#: plugins/check_procs.c:645 msgid "" "Examples:\n" " check_procs -w 2:2 -c 2:1024 -C portsentry\n" @@ -2733,61 +2790,65 @@ msgid "" "\n" " check_procs -w 50000 -c 100000 --metric=VSZ\n" " Alert if vsz of any processes over 50K or 100K\n" +" check_procs -w 10 -c 20 --metric=CPU\n" +" Alert if cpu of any processes over 10% or 20%\n" "\n" msgstr "" -#: plugins/check_radius.c:116 +#: plugins/check_radius.c:117 msgid "Config file error" msgstr "" -#: plugins/check_radius.c:123 +#: plugins/check_radius.c:125 msgid "Out of Memory?" msgstr "" -#: plugins/check_radius.c:144 +#: plugins/check_radius.c:146 msgid "Timeout" msgstr "" -#: plugins/check_radius.c:146 +#: plugins/check_radius.c:148 msgid "Auth Error" msgstr "" -#: plugins/check_radius.c:148 +#: plugins/check_radius.c:150 msgid "Auth Failed" msgstr "" -#: plugins/check_radius.c:152 +#: plugins/check_radius.c:154 msgid "Auth OK" msgstr "" -#: plugins/check_radius.c:190 plugins/check_radius.c:261 +#: plugins/check_radius.c:193 plugins/check_radius.c:267 msgid "Timeout interval must be a positive integer" msgstr "" -#: plugins/check_radius.c:194 plugins/check_radius.c:255 +#: plugins/check_radius.c:197 plugins/check_radius.c:261 msgid "Number of retries must be a positive integer" msgstr "" -#: plugins/check_radius.c:199 plugins/check_radius.c:237 +#: plugins/check_radius.c:202 plugins/check_radius.c:240 msgid "Server port must be a positive integer" msgstr "" -#: plugins/check_radius.c:281 +#: plugins/check_radius.c:287 msgid "Copyright (c) 1999 Robert August Vincent II\n" msgstr "" -#: plugins/check_radius.c:284 +#: plugins/check_radius.c:290 msgid "" "Tests to see if a radius server is accepting connections.\n" "\n" msgstr "" -#: plugins/check_radius.c:292 +#: plugins/check_radius.c:298 msgid "" " -u, --username=STRING\n" " The user to authenticate\n" " -p, --password=STRING\n" " Password for autentication (SECURITY RISK)\n" +" -n, --nas-id=STRING\n" +" NAS identifier\n" " -F, --filename=STRING\n" " Configuration file\n" " -e, --expect=STRING\n" @@ -2796,7 +2857,7 @@ msgid "" " Number of times to retry a failed connection\n" msgstr "" -#: plugins/check_radius.c:306 +#: plugins/check_radius.c:314 msgid "" "\n" "This plugin tests a radius server to see if it is accepting connections.\n" @@ -2807,7 +2868,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_radius.c:313 +#: plugins/check_radius.c:321 msgid "" "The password option presents a substantial security issue because the\n" "password can be determined by careful watching of the command line in\n" @@ -2845,19 +2906,19 @@ msgstr "" msgid "REAL %s - %d second response time\n" msgstr "" -#: plugins/check_real.c:319 plugins/check_smtp.c:243 plugins/check_tcp.c:459 +#: plugins/check_real.c:319 plugins/check_smtp.c:301 plugins/check_tcp.c:463 msgid "Server port must be a positive integer\n" msgstr "" -#: plugins/check_real.c:328 plugins/check_smtp.c:273 +#: plugins/check_real.c:328 plugins/check_smtp.c:345 msgid "Warning time must be a nonnegative integer\n" msgstr "" -#: plugins/check_real.c:337 plugins/check_smtp.c:264 +#: plugins/check_real.c:337 plugins/check_smtp.c:336 msgid "Critical time must be a nonnegative integer\n" msgstr "" -#: plugins/check_real.c:348 plugins/check_smtp.c:284 +#: plugins/check_real.c:348 plugins/check_smtp.c:356 msgid "Time interval must be a nonnegative integer\n" msgstr "" @@ -2893,47 +2954,54 @@ msgid "" "values." msgstr "" -#: plugins/check_smtp.c:108 +#: plugins/check_smtp.c:126 msgid "recv() failed\n" msgstr "" -#: plugins/check_smtp.c:117 +#: plugins/check_smtp.c:137 msgid "Invalid SMTP response received from host\n" msgstr "" -#: plugins/check_smtp.c:119 +#: plugins/check_smtp.c:139 #, c-format msgid "Invalid SMTP response received from host on port %d\n" msgstr "" -#: plugins/check_smtp.c:149 +#: plugins/check_smtp.c:183 plugins/check_snmp.c:512 +msgid "Could Not Compile Regular Expression" +msgstr "" + +#: plugins/check_smtp.c:192 plugins/check_smtp.c:202 #, c-format -msgid "" -"DUMMYCMD: %s\n" -"%s\n" +msgid "SMTP %s - Invalid response '%s' to command '%s'\n" msgstr "" -#: plugins/check_smtp.c:172 +#: plugins/check_smtp.c:196 plugins/check_snmp.c:278 #, c-format -msgid "SMTP %s - %.3f sec. response time, %s|time=%ldus\n" +msgid "Execute Error: %s\n" msgstr "" -#: plugins/check_smtp.c:175 +#: plugins/check_smtp.c:227 #, c-format -msgid "SMTP %s - %.3f second response time|time=%ldus\n" +msgid "SMTP %s - %.3f sec. response time%s%s|%s\n" msgstr "" -#: plugins/check_smtp.c:356 +#: plugins/check_smtp.c:315 plugins/check_smtp.c:325 plugins/check_snmp.c:568 +#, c-format +msgid "Could not realloc() units [%d]\n" +msgstr "" + +#: plugins/check_smtp.c:428 msgid "Copyright (c) 1999-2001 Ethan Galstad \n" msgstr "" -#: plugins/check_smtp.c:359 +#: plugins/check_smtp.c:431 msgid "" "This plugin will attempt to open an SMTP connection with the host.\n" "\n" msgstr "" -#: plugins/check_smtp.c:370 +#: plugins/check_smtp.c:442 #, c-format msgid "" " -e, --expect=STRING\n" @@ -2941,13 +3009,14 @@ msgid "" " -n, nocommand\n" " Suppress SMTP command\n" " -C, --command=STRING\n" -" SMTP command (default: '%s')\n" +" SMTP command (may be used repeatedly)\n" +" -R, --command=STRING\n" +" Expected response to command (may be used repeatedly)\n" " -f, --from=STRING\n" " FROM-address to include in MAIL command, required by Exchange 2000\n" -" (default: '%s')\n" msgstr "" -#: plugins/check_smtp.c:387 +#: plugins/check_smtp.c:461 msgid "" "\n" "Successul connects return STATE_OK, refusals and timeouts return\n" @@ -2956,12 +3025,7 @@ msgid "" "STATE_WARNING return values.\n" msgstr "" -#: plugins/check_snmp.c:278 -#, c-format -msgid "Execute Error: %s\n" -msgstr "" - -#: plugins/check_snmp.c:285 plugins/check_snmp.c:524 +#: plugins/check_snmp.c:285 plugins/check_snmp.c:518 #, c-format msgid "%s UNKNOWN: call for regex which was not a compiled option" msgstr "" @@ -2969,7 +3033,7 @@ msgstr "" #: plugins/check_snmp.c:322 plugins/negate.c:108 #, c-format msgid "" -"%s problem - No data recieved from host\n" +"%s problem - No data received from host\n" "CMD: %s\n" msgstr "" @@ -2978,52 +3042,43 @@ msgstr "" msgid "Invalid critical threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:471 +#: plugins/check_snmp.c:468 #, c-format msgid "Invalid warning threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:518 -msgid "Could Not Compile Regular Expression" -msgstr "" - -#: plugins/check_snmp.c:544 +#: plugins/check_snmp.c:538 #, c-format msgid "Could not realloc() labels[%d]" msgstr "" -#: plugins/check_snmp.c:557 +#: plugins/check_snmp.c:550 msgid "Could not realloc() labels\n" msgstr "" -#: plugins/check_snmp.c:575 -#, c-format -msgid "Could not realloc() units [%d]\n" -msgstr "" - -#: plugins/check_snmp.c:588 +#: plugins/check_snmp.c:580 msgid "Could not realloc() units\n" msgstr "" -#: plugins/check_snmp.c:661 +#: plugins/check_snmp.c:653 #, c-format msgid "" "Missing secname (%s) or authpassword (%s) ! \n" ")" msgstr "" -#: plugins/check_snmp.c:679 +#: plugins/check_snmp.c:671 #, c-format msgid "Invalid SNMP version: %s\n" msgstr "" -#: plugins/check_snmp.c:874 +#: plugins/check_snmp.c:864 msgid "" "Check status of remote machines and obtain sustem information via SNMP\n" "\n" msgstr "" -#: plugins/check_snmp.c:884 +#: plugins/check_snmp.c:874 msgid "" " -P, --protocol=[1|3]\n" " SNMP protocol version\n" @@ -3033,7 +3088,7 @@ msgid "" " SNMPv3 auth proto\n" msgstr "" -#: plugins/check_snmp.c:893 +#: plugins/check_snmp.c:883 #, c-format msgid "" " -C, --community=STRING\n" @@ -3047,7 +3102,7 @@ msgid "" " SNMPv3 crypt passwd (DES)\n" msgstr "" -#: plugins/check_snmp.c:905 +#: plugins/check_snmp.c:895 #, c-format msgid "" " -o, --oid=OID(s)\n" @@ -3060,7 +3115,7 @@ msgid "" " to be the data that should be used in the evaluation.\n" msgstr "" -#: plugins/check_snmp.c:915 +#: plugins/check_snmp.c:905 msgid "" " -w, --warning=INTEGER_RANGE(s)\n" " Range(s) which will not result in a WARNING status\n" @@ -3068,7 +3123,7 @@ msgid "" " Range(s) which will not result in a CRITICAL status\n" msgstr "" -#: plugins/check_snmp.c:922 +#: plugins/check_snmp.c:912 msgid "" " -s, --string=STRING\n" " Return OK state (for that OID) if STRING is an exact match\n" @@ -3082,7 +3137,7 @@ msgid "" " Prefix label for output from plugin (default -s 'SNMP')\n" msgstr "" -#: plugins/check_snmp.c:933 +#: plugins/check_snmp.c:923 msgid "" " -u, --units=STRING\n" " Units label(s) for output data (e.g., 'sec.').\n" @@ -3090,7 +3145,7 @@ msgid "" " Separates output on multiple OID requests\n" msgstr "" -#: plugins/check_snmp.c:943 +#: plugins/check_snmp.c:933 msgid "" "\n" "- This plugin uses the 'snmpget' command included with the NET-SNMP " @@ -3100,14 +3155,14 @@ msgid "" " http://net-snmp.sourceforge.net before you can use this plugin.\n" msgstr "" -#: plugins/check_snmp.c:948 +#: plugins/check_snmp.c:938 msgid "" "- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " "with\n" " internal spaces must be quoted) [max 8 OIDs]\n" msgstr "" -#: plugins/check_snmp.c:952 +#: plugins/check_snmp.c:942 msgid "" "- Ranges are inclusive and are indicated with colons. When specified as\n" " 'min:max' a STATE_OK will be returned if the result is within the " @@ -3116,14 +3171,14 @@ msgid "" " returned if the result is outside the specified range.\n" msgstr "" -#: plugins/check_snmp.c:958 +#: plugins/check_snmp.c:948 msgid "" "- If specified in the order 'max:min' a non-OK state will be returned if " "the\n" " result is within the (inclusive) range.\n" msgstr "" -#: plugins/check_snmp.c:962 +#: plugins/check_snmp.c:952 msgid "" "- Upper or lower bounds may be omitted to skip checking the respective " "limit.\n" @@ -3136,7 +3191,7 @@ msgid "" " returned from the SNMP query is an unsigned integer.\n" msgstr "" -#: plugins/check_snmp.c:976 +#: plugins/check_snmp.c:966 #, c-format msgid "" "Usage: %s -H -o [-w warn_range] [-c crit_range] \n" @@ -3172,46 +3227,46 @@ msgstr "" msgid "Usage: %s [-46] [-t ] [-p ] \n" msgstr "" -#: plugins/check_swap.c:125 +#: plugins/check_swap.c:145 #, c-format msgid "Command: %s\n" msgstr "" -#: plugins/check_swap.c:127 +#: plugins/check_swap.c:147 #, c-format msgid "Format: %s\n" msgstr "" -#: plugins/check_swap.c:163 +#: plugins/check_swap.c:183 #, c-format msgid "total=%d, used=%d, free=%d\n" msgstr "" -#: plugins/check_swap.c:186 +#: plugins/check_swap.c:197 #, c-format msgid "total=%d, free=%d\n" msgstr "" -#: plugins/check_swap.c:222 +#: plugins/check_swap.c:314 #, c-format -msgid " %d%% free (%lu MB out of %lu MB)%s" +msgid " %d%% free (%llu MB out of %llu MB)" msgstr "" -#: plugins/check_swap.c:365 +#: plugins/check_swap.c:464 msgid "Warning percentage should be more than critical percentage\n" msgstr "" -#: plugins/check_swap.c:369 +#: plugins/check_swap.c:468 msgid "Warning free space should be more than critical free space\n" msgstr "" -#: plugins/check_swap.c:386 +#: plugins/check_swap.c:485 msgid "" "Check swap space on local server.\n" "\n" msgstr "" -#: plugins/check_swap.c:392 +#: plugins/check_swap.c:491 #, c-format msgid "" "\n" @@ -3219,19 +3274,19 @@ msgid "" " Exit with WARNING status if less than INTEGER bytes of swap space are " "free\n" " -w, --warning=PERCENT%%\n" -" Exit with WARNING status if less than PERCENT of swap space has been " -"used\n" +" Exit with WARNING status if less than PERCENT of swap space is free\n" " -c, --critical=INTEGER\n" " Exit with CRITICAL status if less than INTEGER bytes of swap space are " "free\n" " -c, --critical=PERCENT%%\n" -" Exit with CRITCAL status if less than PERCENT of swap space has been " -"used\n" +" Exit with CRITCAL status if less than PERCENT of swap space is free\n" " -a, --allswaps\n" " Conduct comparisons for all swap partitions, one by one\n" +" -v, --verbose\n" +" Verbose output. Up to 3 levels\n" msgstr "" -#: plugins/check_swap.c:404 +#: plugins/check_swap.c:505 msgid "" "\n" "On Solaris, if -a specified, uses swap -l, otherwise uses swap -s.\n" @@ -3239,18 +3294,18 @@ msgid "" "real memory\n" msgstr "" -#: plugins/check_swap.c:408 +#: plugins/check_swap.c:509 msgid "" "\n" "On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" msgstr "" -#: plugins/check_swap.c:420 +#: plugins/check_swap.c:521 #, c-format msgid "" "Usage:\n" -" %s [-a] -w %% -c %%\n" -" %s [-a] -w -c \n" +" %s [-av] -w %% -c %%\n" +" %s [-av] -w -c \n" " %s (-h | --help) for detailed help\n" " %s (-V | --version) for version information\n" msgstr "" @@ -3268,61 +3323,61 @@ msgstr "" msgid "%s %s%s - %.3f second response time on port %d" msgstr "" -#: plugins/check_tcp.c:426 +#: plugins/check_tcp.c:430 msgid "invalid host name or address" msgstr "" -#: plugins/check_tcp.c:431 plugins/check_time.c:252 plugins/check_time.c:264 -#: plugins/check_udp.c:166 plugins/check_users.c:145 +#: plugins/check_tcp.c:435 plugins/check_time.c:266 plugins/check_time.c:278 +#: plugins/check_udp.c:166 plugins/check_users.c:154 msgid "Critical threshold must be a nonnegative integer\n" msgstr "" -#: plugins/check_tcp.c:438 plugins/check_time.c:233 plugins/check_time.c:257 -#: plugins/check_udp.c:173 plugins/check_users.c:151 plugins/check_users.c:161 -#: plugins/check_users.c:168 +#: plugins/check_tcp.c:442 plugins/check_time.c:247 plugins/check_time.c:271 +#: plugins/check_udp.c:173 plugins/check_users.c:160 plugins/check_users.c:170 +#: plugins/check_users.c:177 msgid "Warning threshold must be a nonnegative integer\n" msgstr "" -#: plugins/check_tcp.c:453 +#: plugins/check_tcp.c:457 msgid "Timeout interval must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:476 +#: plugins/check_tcp.c:480 msgid "Maxbytes must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:490 +#: plugins/check_tcp.c:494 msgid "Refuse mut be one of ok, warn, crit\n" msgstr "" -#: plugins/check_tcp.c:496 +#: plugins/check_tcp.c:500 msgid "Delay must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:501 +#: plugins/check_tcp.c:505 msgid "SSL support not available. Install OpenSSL and recompile." msgstr "" -#: plugins/check_tcp.c:509 +#: plugins/check_tcp.c:513 msgid "You must provide a server address\n" msgstr "" -#: plugins/check_tcp.c:527 +#: plugins/check_tcp.c:531 msgid "ERROR: Cannot create SSL context.\n" msgstr "" -#: plugins/check_tcp.c:553 +#: plugins/check_tcp.c:557 msgid "ERROR: Cannot initiate SSL handshake.\n" msgstr "" -#: plugins/check_tcp.c:599 +#: plugins/check_tcp.c:603 #, c-format msgid "" "This plugin tests %s connections with the specified host.\n" "\n" msgstr "" -#: plugins/check_tcp.c:610 +#: plugins/check_tcp.c:614 msgid "" " -s, --send=STRING\n" " String to send to the server\n" @@ -3332,7 +3387,7 @@ msgid "" " String to send server to initiate a clean close of the connection\n" msgstr "" -#: plugins/check_tcp.c:618 +#: plugins/check_tcp.c:622 msgid "" " -r, --refuse=ok|warn|crit\n" " Accept tcp refusals with states ok, warn, crit (default: crit)\n" @@ -3342,7 +3397,7 @@ msgid "" " Seconds to wait between sending string and polling for response\n" msgstr "" -#: plugins/check_tcp.c:641 +#: plugins/check_tcp.c:645 #, c-format msgid "" "Usage: %s -H host -p port [-w ] [-c ]\n" @@ -3351,67 +3406,67 @@ msgid "" " [-r ] [-v] [-4|-6]\n" msgstr "" -#: plugins/check_time.c:87 +#: plugins/check_time.c:88 #, c-format msgid "TIME UNKNOWN - could not connect to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:100 +#: plugins/check_time.c:101 #, c-format msgid "TIME UNKNOWN - could not send UDP request to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:124 +#: plugins/check_time.c:125 #, c-format msgid "TIME UNKNOWN - no data on recv() from server %s, port %d\n" msgstr "" -#: plugins/check_time.c:136 +#: plugins/check_time.c:138 #, c-format -msgid "TIME %s - %d second response time\n" +msgid "TIME %s - %d second response time|%s\n" msgstr "" -#: plugins/check_time.c:150 +#: plugins/check_time.c:156 #, c-format -msgid "TIME %s - %lu second time difference\n" +msgid "TIME %s - %lu second time difference|%s %s\n" msgstr "" -#: plugins/check_time.c:215 plugins/check_time.c:290 plugins/check_udp.c:161 +#: plugins/check_time.c:229 plugins/check_time.c:304 plugins/check_udp.c:161 #: plugins/check_udp.c:202 msgid "Invalid host name/address\n" msgstr "" -#: plugins/check_time.c:229 +#: plugins/check_time.c:243 msgid "Warning thresholds must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:248 +#: plugins/check_time.c:262 msgid "Critical thresholds must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:271 plugins/check_udp.c:186 +#: plugins/check_time.c:285 plugins/check_udp.c:186 msgid "Server port must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:277 plugins/check_udp.c:180 +#: plugins/check_time.c:291 plugins/check_udp.c:180 msgid "Timeout interval must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:294 plugins/check_udp.c:207 +#: plugins/check_time.c:308 plugins/check_udp.c:207 msgid "Host name was not supplied\n" msgstr "" -#: plugins/check_time.c:314 plugins/check_udp.c:225 plugins/check_users.c:186 +#: plugins/check_time.c:328 plugins/check_udp.c:225 plugins/check_users.c:195 msgid "Copyright (c) 1999 Ethan Galstad\n" msgstr "" -#: plugins/check_time.c:317 +#: plugins/check_time.c:331 msgid "" "This plugin will check the time on the specified host.\n" "\n" msgstr "" -#: plugins/check_time.c:326 +#: plugins/check_time.c:340 msgid "" " -u, --udp\n" " Use UDP to connect, not TCP\n" @@ -3425,7 +3480,7 @@ msgid "" " Response time (sec.) necessary to result in critical status\n" msgstr "" -#: plugins/check_time.c:349 +#: plugins/check_time.c:363 #, c-format msgid "" "Usage: %s -H [-p port] [-u] [-w variance] [-c variance]\n" @@ -3474,11 +3529,11 @@ msgid "" " [-e expect] [-s send] [-t to_sec] [-v]\n" msgstr "" -#: plugins/check_ups.c:546 +#: plugins/check_ups.c:573 msgid "Copyright (c) 2000 Tom Shields" msgstr "" -#: plugins/check_ups.c:549 +#: plugins/check_ups.c:576 msgid "" "This plugin tests the UPS service on the specified host.\n" "Network UPS Tools from www.exploits.org must be running for this plugin to\n" @@ -3486,13 +3541,13 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:559 +#: plugins/check_ups.c:586 msgid "" " -u, --ups=STRING\n" " Name of UPS\n" msgstr "" -#: plugins/check_ups.c:569 +#: plugins/check_ups.c:596 msgid "" "This plugin attempts to determine the status of a UPS (Uninterruptible " "Power\n" @@ -3505,7 +3560,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:576 +#: plugins/check_ups.c:603 msgid "" "You may also specify a variable to check [such as temperature, utility " "voltage,\n" @@ -3517,7 +3572,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:582 +#: plugins/check_ups.c:609 msgid "" "Notes:\n" "\n" @@ -3528,31 +3583,31 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:597 +#: plugins/check_ups.c:624 #, c-format msgid "" "Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n" " [-t timeout] [-v]\n" msgstr "" -#: plugins/check_users.c:73 +#: plugins/check_users.c:76 #, c-format msgid "# users=%d" msgstr "" -#: plugins/check_users.c:98 +#: plugins/check_users.c:106 #, c-format -msgid "USERS %s - %d users currently logged in\n" +msgid "USERS %s - %d users currently logged in |%s\n" msgstr "" -#: plugins/check_users.c:189 +#: plugins/check_users.c:198 msgid "" "This plugin checks the number of users currently logged in on the local\n" "system and generates an error if the number exceeds the thresholds " "specified.\n" msgstr "" -#: plugins/check_users.c:197 +#: plugins/check_users.c:206 msgid "" " -w, --warning=INTEGER\n" " Set WARNING status if more than INTEGER users are logged in\n" @@ -3597,7 +3652,7 @@ msgstr "" #: plugins/urlize.c:105 #, c-format msgid "" -"%s problem - No data recieved from host\n" +"%s problem - No data received from host\n" "CMD: %s\n" msgstr "" diff --git a/po/fr.po b/po/fr.po index 65a5a9b..c1de41d 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: nagios-plugins 1.3.99\n" -"POT-Creation-Date: 2003-10-29 21:39-0500\n" +"POT-Creation-Date: 2004-11-12 00:44+0000\n" "PO-Revision-Date: 2003-07-25 06:55-0400\n" "Last-Translator: Pierre-Antoine Angelini \n" "Language-Team: French \n" @@ -15,104 +15,110 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Report-Msgid-Bugs-To: \n" -#: plugins/check_by_ssh.c:69 plugins/check_dig.c:68 plugins/check_disk.c:164 -#: plugins/check_fping.c:69 plugins/check_nagios.c:64 plugins/check_nt.c:103 -#: plugins/check_nwstat.c:125 plugins/check_radius.c:111 -#: plugins/check_ssh.c:56 plugins/check_tcp.c:211 plugins/check_users.c:49 +#: plugins/check_by_ssh.c:70 plugins/check_dig.c:70 plugins/check_disk.c:165 +#: plugins/check_fping.c:69 plugins/check_nagios.c:67 plugins/check_nt.c:112 +#: plugins/check_nwstat.c:126 plugins/check_radius.c:112 +#: plugins/check_ssh.c:56 plugins/check_tcp.c:212 plugins/check_users.c:52 #: plugins/negate.c:83 msgid "Could not parse arguments\n" msgstr "" -#: plugins/check_by_ssh.c:74 plugins/check_dns.c:91 plugins/check_nagios.c:68 -#: plugins/check_pgsql.c:140 plugins/check_ping.c:84 plugins/negate.c:87 +#: plugins/check_by_ssh.c:75 plugins/check_dns.c:69 plugins/check_nagios.c:71 +#: plugins/check_pgsql.c:140 plugins/check_ping.c:86 plugins/negate.c:87 msgid "Cannot catch SIGALRM" msgstr "" -#: plugins/check_by_ssh.c:88 +#: plugins/check_by_ssh.c:89 #, c-format msgid "Unable to open pipe: %s" msgstr "" -#: plugins/check_by_ssh.c:96 plugins/check_dig.c:89 plugins/check_dns.c:117 +#: plugins/check_by_ssh.c:97 plugins/check_dig.c:97 plugins/check_dns.c:96 #: plugins/check_fping.c:89 plugins/check_hpjd.c:118 plugins/check_load.c:115 -#: plugins/check_nagios.c:101 plugins/check_procs.c:129 -#: plugins/check_snmp.c:179 plugins/check_swap.c:137 plugins/check_users.c:60 +#: plugins/check_nagios.c:107 plugins/check_procs.c:133 +#: plugins/check_snmp.c:179 plugins/check_swap.c:157 plugins/check_users.c:63 #: plugins/negate.c:97 plugins/urlize.c:93 #, c-format msgid "Could not open stderr for %s\n" msgstr "" -#: plugins/check_by_ssh.c:123 +#: plugins/check_by_ssh.c:129 #, c-format msgid "SSH WARNING: could not open %s\n" msgstr "" -#: plugins/check_by_ssh.c:142 +#: plugins/check_by_ssh.c:148 #, c-format msgid "[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n" msgstr "" -#: plugins/check_by_ssh.c:228 +#: plugins/check_by_ssh.c:235 msgid "timeout interval must be an integer" msgstr "" -#: plugins/check_by_ssh.c:234 +#: plugins/check_by_ssh.c:241 msgid "invalid host name" msgstr "" -#: plugins/check_by_ssh.c:239 +#: plugins/check_by_ssh.c:246 msgid "port must be an integer" msgstr "" -#: plugins/check_by_ssh.c:284 +#: plugins/check_by_ssh.c:288 +msgid "skip lines must be an integer" +msgstr "" + +#: plugins/check_by_ssh.c:298 #, c-format msgid "%s: You must provide a host name\n" msgstr "" -#: plugins/check_by_ssh.c:286 +#: plugins/check_by_ssh.c:300 #, c-format msgid "%s: Invalid host name %s\n" msgstr "" -#: plugins/check_by_ssh.c:302 +#: plugins/check_by_ssh.c:316 msgid "No remotecmd\n" msgstr "" -#: plugins/check_by_ssh.c:320 +#: plugins/check_by_ssh.c:334 #, c-format msgid "" "%s: In passive mode, you must provide a service name for each command.\n" msgstr "" -#: plugins/check_by_ssh.c:323 +#: plugins/check_by_ssh.c:337 #, c-format msgid "" "%s: In passive mode, you must provide the host short name from the nagios " "configs.\n" msgstr "" -#: plugins/check_by_ssh.c:338 +#: plugins/check_by_ssh.c:352 msgid "" "Copyright (c) 1999 Karl DeBisschop \n" msgstr "" -#: plugins/check_by_ssh.c:341 +#: plugins/check_by_ssh.c:355 msgid "" "This plugin uses SSH to execute commands on a remote host\n" "\n" msgstr "" -#: plugins/check_by_ssh.c:351 +#: plugins/check_by_ssh.c:365 msgid "" " -1, --proto1\n" " tell ssh to use Protocol 1\n" " -2, --proto2\n" " tell ssh to use Protocol 2\n" +" -S, --skiplines=n\n" +" Ignore first n lines on STDERR (to suppress a logon banner)\n" " -f\n" " tells ssh to fork rather than create a tty\n" msgstr "" -#: plugins/check_by_ssh.c:359 +#: plugins/check_by_ssh.c:375 msgid "" " -C, --command='COMMAND STRING'\n" " command to execute on the remote machine\n" @@ -128,7 +134,7 @@ msgid "" " short name of host in nagios configuration [optional]\n" msgstr "" -#: plugins/check_by_ssh.c:377 +#: plugins/check_by_ssh.c:393 msgid "" "\n" "The most common mode of use is to refer to a local identity file with\n" @@ -140,7 +146,7 @@ msgid "" "execute additional commands as proxy\n" msgstr "" -#: plugins/check_by_ssh.c:386 +#: plugins/check_by_ssh.c:402 msgid "" "\n" "To use passive mode, provide multiple '-C' options, and provide\n" @@ -148,7 +154,18 @@ msgid "" "options)\n" msgstr "" -#: plugins/check_by_ssh.c:401 +#: plugins/check_by_ssh.c:407 +msgid "" +"\n" +"$ check_by_ssh -H localhost -n lh -s c1:c2:c3 \\\n" +" -C uptime -C uptime -C uptime -O /tmp/foo\n" +"$ cat /tmp/foo\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c1;0; up 2 days...\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days...\n" +"[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days...\n" +msgstr "" + +#: plugins/check_by_ssh.c:425 #, c-format msgid "" "\n" @@ -156,99 +173,105 @@ msgid "" " -C [-n name] [-s servicelist] [-O outputfile] [-p port]\n" msgstr "" -#: plugins/check_dig.c:65 +#: plugins/check_dig.c:67 msgid "Cannot catch SIGALRM\n" msgstr "" -#: plugins/check_dig.c:83 plugins/check_dns.c:111 plugins/check_hpjd.c:112 -#: plugins/check_nagios.c:95 plugins/check_procs.c:123 -#: plugins/check_snmp.c:173 plugins/check_swap.c:131 plugins/check_users.c:54 +#: plugins/check_dig.c:91 plugins/check_dns.c:90 plugins/check_hpjd.c:112 +#: plugins/check_nagios.c:101 plugins/check_procs.c:127 +#: plugins/check_snmp.c:173 plugins/check_swap.c:151 plugins/check_users.c:57 #: plugins/negate.c:93 plugins/urlize.c:87 #, c-format msgid "Could not open pipe: %s\n" msgstr "" -#: plugins/check_dig.c:108 +#: plugins/check_dig.c:128 msgid "Server not found in ANSWER SECTION" msgstr "" -#: plugins/check_dig.c:118 +#: plugins/check_dig.c:137 msgid "No ANSWER SECTION found" msgstr "" -#: plugins/check_dig.c:135 +#: plugins/check_dig.c:154 msgid "dig returned error status" msgstr "" -#: plugins/check_dig.c:142 plugins/check_dns.c:221 plugins/check_dns.c:224 -#: plugins/check_dns.c:227 +#: plugins/check_dig.c:161 plugins/check_dns.c:205 plugins/check_dns.c:208 +#: plugins/check_dns.c:211 msgid " Probably a non-existent host/domain" msgstr "" -#: plugins/check_dig.c:150 +#: plugins/check_dig.c:169 #, c-format msgid "%.3f seconds response time (%s)" msgstr "" -#: plugins/check_dig.c:198 plugins/check_pgsql.c:210 plugins/check_ping.c:199 -#: plugins/check_time.c:206 plugins/negate.c:172 plugins/urlize.c:72 +#: plugins/check_dig.c:219 plugins/check_pgsql.c:209 plugins/check_ping.c:201 +#: plugins/check_time.c:220 plugins/negate.c:172 plugins/urlize.c:72 msgid "Unknown argument" msgstr "" -#: plugins/check_dig.c:210 plugins/check_dig.c:265 plugins/check_hpjd.c:347 -#: plugins/check_real.c:368 plugins/check_smtp.c:314 +#: plugins/check_dig.c:231 plugins/check_dig.c:288 plugins/check_hpjd.c:347 +#: plugins/check_real.c:368 plugins/check_smtp.c:386 msgid "Invalid host name" msgstr "" -#: plugins/check_dig.c:218 +#: plugins/check_dig.c:239 msgid "Server port must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:228 -msgid "Input causes overflow in warning interval" -msgstr "" - -#: plugins/check_dig.c:231 +#: plugins/check_dig.c:250 msgid "Warning interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:238 -msgid "Input causes overflow in critical interval" -msgstr "" - -#: plugins/check_dig.c:241 +#: plugins/check_dig.c:258 msgid "Critical interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:249 +#: plugins/check_dig.c:266 msgid "Time interval must be a nonnegative integer" msgstr "" -#: plugins/check_dig.c:301 plugins/urlize.c:132 +#: plugins/check_dig.c:324 plugins/urlize.c:132 msgid "" "Copyright (c) 2000 Karl DeBisschop \n" msgstr "" -#: plugins/check_dig.c:304 +#: plugins/check_dig.c:327 msgid "" "Test the DNS service on the specified host using dig\n" "\n" msgstr "" -#: plugins/check_dig.c:312 +#: plugins/check_dig.c:335 msgid "" " -l, --lookup=STRING\n" " machine name to lookup\n" msgstr "" -#: plugins/check_dig.c:331 +#: plugins/check_dig.c:339 +msgid "" +" -T, --record_type=STRING\n" +" record type to lookup (default: A)\n" +msgstr "" + +#: plugins/check_dig.c:343 +msgid "" +" -a, --expected_address=STRING\n" +" an address expected to be in the asnwer section.\n" +" if not set, uses whatever was in -l\n" +msgstr "" + +#: plugins/check_dig.c:363 #, c-format msgid "" -"Usage: %s -H host -l lookup [-p ] [-w ]\n" -" [-c ] [-t ] [-v]\n" +"Usage: %s -H host -l lookup [-p ] [-T ]\n" +" [-w ] [-c ] [-t ]\n" +" [-a ] [-v]\n" msgstr "" -#: plugins/check_disk.c:212 +#: plugins/check_disk.c:213 #, c-format msgid "" "%s\n" @@ -256,70 +279,70 @@ msgid "" "lu warn%%:%.0f%% crit%%:%.0f%%" msgstr "" -#: plugins/check_disk.c:230 +#: plugins/check_disk.c:231 #, c-format msgid "%s [%s not found]" msgstr "" -#: plugins/check_disk.c:306 +#: plugins/check_disk.c:307 msgid "Timeout Interval must be an integer!\n" msgstr "" -#: plugins/check_disk.c:323 plugins/check_swap.c:292 +#: plugins/check_disk.c:324 plugins/check_swap.c:391 msgid "Warning threshold must be integer or percentage!\n" msgstr "" -#: plugins/check_disk.c:340 plugins/check_swap.c:309 +#: plugins/check_disk.c:341 plugins/check_swap.c:408 msgid "Critical threshold must be integer or percentage!\n" msgstr "" -#: plugins/check_disk.c:361 +#: plugins/check_disk.c:362 #, c-format msgid "unit type %s not known\n" msgstr "" -#: plugins/check_disk.c:364 +#: plugins/check_disk.c:365 #, c-format msgid "failed allocating storage for '%s'\n" msgstr "" -#: plugins/check_disk.c:431 +#: plugins/check_disk.c:440 msgid "check_disk: unrecognized option\n" msgstr "" -#: plugins/check_disk.c:488 +#: plugins/check_disk.c:497 msgid "INPUT ERROR: No thresholds specified" msgstr "" -#: plugins/check_disk.c:494 +#: plugins/check_disk.c:503 #, c-format msgid "" "INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be " "between zero and 100 percent, inclusive" msgstr "" -#: plugins/check_disk.c:501 +#: plugins/check_disk.c:510 #, c-format msgid "" "INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " "greater than zero" msgstr "" -#: plugins/check_disk.c:566 plugins/check_dns.c:406 plugins/check_dummy.c:84 -#: plugins/check_hpjd.c:381 plugins/check_http.c:1103 plugins/check_mrtg.c:307 -#: plugins/check_mrtgtraf.c:325 plugins/check_nwstat.c:903 -#: plugins/check_overcr.c:423 plugins/check_tcp.c:596 +#: plugins/check_disk.c:575 plugins/check_dns.c:394 plugins/check_dummy.c:89 +#: plugins/check_hpjd.c:381 plugins/check_http.c:1113 plugins/check_mrtg.c:311 +#: plugins/check_mrtgtraf.c:323 plugins/check_nwstat.c:909 +#: plugins/check_overcr.c:423 plugins/check_tcp.c:600 msgid "Copyright (c) 1999 Ethan Galstad \n" msgstr "" -#: plugins/check_disk.c:569 +#: plugins/check_disk.c:578 msgid "" "This plugin checks the amount of used disk space on a mounted file system\n" "and generates an alert if free space is less than one of the threshold " "values." msgstr "" -#: plugins/check_disk.c:577 +#: plugins/check_disk.c:586 #, c-format msgid "" " -w, --warning=INTEGER\n" @@ -335,7 +358,7 @@ msgid "" " Clear thresholds\n" msgstr "" -#: plugins/check_disk.c:589 +#: plugins/check_disk.c:598 msgid "" " -u, --units=STRING\n" " Choose bytes, kB, MB, GB, TB (default: MB)\n" @@ -345,7 +368,7 @@ msgid "" " Same as '--units MB'\n" msgstr "" -#: plugins/check_disk.c:597 +#: plugins/check_disk.c:606 msgid "" " -l, --local\n" " Only check local filesystems\n" @@ -361,14 +384,14 @@ msgid "" " Display only devices/mountpoints with errors\n" msgstr "" -#: plugins/check_disk.c:617 +#: plugins/check_disk.c:626 msgid "" "Examples:\n" " check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /\n" " Checks /tmp and /var at 10%,5% and / at 100MB, 50MB\n" msgstr "" -#: plugins/check_disk.c:630 +#: plugins/check_disk.c:639 #, c-format msgid "" "Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n" @@ -377,114 +400,135 @@ msgid "" " %s (-V|--version)\n" msgstr "" -#: plugins/check_dns.c:129 plugins/check_dns.c:158 +#: plugins/check_dns.c:108 msgid "Unknown error (plugin)" msgstr "" -#: plugins/check_dns.c:153 +#: plugins/check_dns.c:128 #, c-format msgid "DNS CRITICAL - '%s' returned empty host name string\n" msgstr "" -#: plugins/check_dns.c:190 +#: plugins/check_dns.c:167 msgid "nslookup returned error status" msgstr "" -#: plugins/check_dns.c:197 +#: plugins/check_dns.c:174 #, c-format msgid "DNS CRITICAL - '%s' output parsing exited with no address\n" msgstr "" -#: plugins/check_dns.c:203 +#: plugins/check_dns.c:180 #, c-format msgid "expected %s but got %s" msgstr "" -#: plugins/check_dns.c:215 +#: plugins/check_dns.c:186 #, c-format -msgid "DNS ok - %.3f seconds response time, address%s %s|%s\n" +msgid "server %s is not authoritative for %s" +msgstr "" + +#: plugins/check_dns.c:198 +msgid "DNS" msgstr "" -#: plugins/check_dns.c:220 +#: plugins/check_dns.c:198 plugins/check_dummy.c:58 plugins/check_http.c:678 +#: plugins/check_http.c:928 plugins/check_procs.c:263 +msgid "OK" +msgstr "" + +#: plugins/check_dns.c:199 +#, c-format +msgid "%.3f second response time, " +msgid_plural "%.3f seconds response time, " +msgstr[0] "" +msgstr[1] "" + +#: plugins/check_dns.c:200 +#, c-format +msgid "%s returns %s" +msgstr "" + +#: plugins/check_dns.c:204 #, c-format msgid "DNS WARNING - %s\n" msgstr "" -#: plugins/check_dns.c:223 +#: plugins/check_dns.c:207 #, c-format msgid "DNS CRITICAL - %s\n" msgstr "" -#: plugins/check_dns.c:226 +#: plugins/check_dns.c:210 #, c-format msgid "DNS problem - %s\n" msgstr "" -#: plugins/check_dns.c:244 +#: plugins/check_dns.c:228 #, c-format msgid "No response from name server %s\n" msgstr "" -#: plugins/check_dns.c:248 +#: plugins/check_dns.c:232 #, c-format msgid "Name server %s has no records\n" msgstr "" -#: plugins/check_dns.c:255 +#: plugins/check_dns.c:239 #, c-format msgid "Connection to name server %s was refused\n" msgstr "" -#: plugins/check_dns.c:261 +#: plugins/check_dns.c:245 #, c-format msgid "Domain %s was not found by the server\n" msgstr "" -#: plugins/check_dns.c:265 +#: plugins/check_dns.c:249 msgid "Network is unreachable\n" msgstr "" -#: plugins/check_dns.c:269 +#: plugins/check_dns.c:253 #, c-format msgid "Server failure for %s\n" msgstr "" -#: plugins/check_dns.c:314 plugins/check_fping.c:243 plugins/check_game.c:210 -#: plugins/check_overcr.c:335 plugins/check_radius.c:213 -#: plugins/check_tcp.c:402 plugins/check_udp.c:147 plugins/check_users.c:134 +#: plugins/check_dns.c:299 plugins/check_fping.c:243 plugins/check_game.c:210 +#: plugins/check_overcr.c:335 plugins/check_radius.c:216 +#: plugins/check_tcp.c:406 plugins/check_udp.c:147 plugins/check_users.c:143 #, c-format msgid "" "%s: Unknown argument: %s\n" "\n" msgstr "" -#: plugins/check_dns.c:331 plugins/check_dns.c:343 plugins/check_dns.c:354 -#: plugins/check_dns.c:359 plugins/check_dns.c:369 plugins/check_dns.c:380 +#: plugins/check_dns.c:316 plugins/check_dns.c:328 plugins/check_dns.c:339 +#: plugins/check_dns.c:344 plugins/check_dns.c:357 plugins/check_dns.c:368 #: plugins/check_game.c:227 plugins/check_game.c:235 msgid "Input buffer overflow\n" msgstr "" -#: plugins/check_dns.c:338 +#: plugins/check_dns.c:323 msgid "" "Invalid server name/address\n" "\n" msgstr "" -#: plugins/check_dns.c:349 plugins/check_fping.c:257 -#: plugins/check_radius.c:227 +#: plugins/check_dns.c:334 plugins/check_fping.c:257 +#: plugins/check_radius.c:230 msgid "" "Invalid host name/address\n" "\n" msgstr "" -#: plugins/check_dns.c:376 +#: plugins/check_dns.c:364 #, c-format msgid "" "Invalid name/address: %s\n" "\n" msgstr "" -#: plugins/check_dns.c:413 +#: plugins/check_dns.c:401 msgid "" "-H, --hostname=HOST\n" " The name or address you want to query\n" @@ -492,9 +536,11 @@ msgid "" " Optional DNS server you want to use for the lookup\n" "-a, --expected-address=IP-ADDRESS\n" " Optional IP address you expect the DNS server to return\n" +"-A, --expect-authority\n" +" Optionally expect the DNS server to be authoritative for the lookup\n" msgstr "" -#: plugins/check_dns.c:423 +#: plugins/check_dns.c:413 msgid "" "\n" "This plugin uses the nslookup program to obtain the IP address\n" @@ -503,10 +549,10 @@ msgid "" "specified in /etc/resolv.conf will be used.\n" msgstr "" -#: plugins/check_dns.c:438 +#: plugins/check_dns.c:428 #, c-format msgid "" -"Usage: %s -H host [-s server] [-a expected-address] [-t timeout]\n" +"Usage: %s -H host [-s server] [-a expected-address] [-A] [-t timeout]\n" " %s --help\n" " %s --version\n" msgstr "" @@ -519,16 +565,33 @@ msgstr "" msgid "Arguments to check_dummy must be an integer\n" msgstr "" -#: plugins/check_dummy.c:91 +#: plugins/check_dummy.c:61 plugins/check_http.c:680 plugins/check_procs.c:265 +msgid "WARNING" +msgstr "" + +#: plugins/check_dummy.c:64 plugins/check_http.c:682 plugins/check_procs.c:270 +msgid "CRITICAL" +msgstr "" + +#: plugins/check_dummy.c:67 plugins/check_http.c:676 +msgid "UNKNOWN" +msgstr "" + +#: plugins/check_dummy.c:70 +#, c-format +msgid "Status %d is not a supported error state\n" +msgstr "" + +#: plugins/check_dummy.c:96 msgid "" "\n" "This plugin will simply return the state corresponding to the numeric value\n" -"of the argument.\n" +"of the argument with optional text.\n" msgstr "" -#: plugins/check_dummy.c:103 +#: plugins/check_dummy.c:108 #, c-format -msgid "Usage: %s \n" +msgid "Usage: %s [optional text]\n" msgstr "" #: plugins/check_fping.c:83 @@ -684,8 +747,8 @@ msgid "" msgstr "" #: plugins/check_hpjd.c:87 plugins/check_mrtg.c:61 plugins/check_mrtgtraf.c:67 -#: plugins/check_mysql.c:51 plugins/check_real.c:69 plugins/check_smtp.c:74 -#: plugins/check_swap.c:78 plugins/check_time.c:63 +#: plugins/check_mysql.c:51 plugins/check_real.c:69 plugins/check_smtp.c:93 +#: plugins/check_swap.c:93 plugins/check_time.c:64 msgid "Invalid command arguments supplied\n" msgstr "" @@ -739,13 +802,13 @@ msgid "Printer ok - (%s)\n" msgstr "" #: plugins/check_hpjd.c:324 plugins/check_mysql.c:132 plugins/check_real.c:306 -#: plugins/check_smtp.c:236 +#: plugins/check_smtp.c:294 msgid "Invalid host name\n" msgstr "" -#: plugins/check_hpjd.c:337 plugins/check_load.c:230 plugins/check_mrtg.c:228 -#: plugins/check_mrtgtraf.c:264 plugins/check_mysql.c:154 -#: plugins/check_real.c:358 plugins/check_smtp.c:304 plugins/check_swap.c:324 +#: plugins/check_hpjd.c:337 plugins/check_load.c:230 plugins/check_mrtg.c:232 +#: plugins/check_mrtgtraf.c:262 plugins/check_mysql.c:154 +#: plugins/check_real.c:358 plugins/check_smtp.c:376 plugins/check_swap.c:423 msgid "Invalid argument\n" msgstr "" @@ -768,246 +831,230 @@ msgstr "" msgid "Usage: %s -H host [-C community]\n" msgstr "" -#: plugins/check_http.c:141 +#: plugins/check_http.c:142 msgid "check_http: could not parse arguments\n" msgstr "" -#: plugins/check_http.c:162 +#: plugins/check_http.c:163 msgid "HTTP CRITICAL - Could not make SSL connection\n" msgstr "" -#: plugins/check_http.c:168 plugins/check_http.c:495 +#: plugins/check_http.c:169 plugins/check_http.c:501 msgid "ERROR: Cannot retrieve server certificate.\n" msgstr "" -#: plugins/check_http.c:239 +#: plugins/check_http.c:242 msgid "unknown argument" msgstr "" -#: plugins/check_http.c:251 +#: plugins/check_http.c:254 msgid "timeout interval must be a non-negative integer" msgstr "" -#: plugins/check_http.c:257 +#: plugins/check_http.c:260 msgid "invalid critical threshold" msgstr "" -#: plugins/check_http.c:265 +#: plugins/check_http.c:268 msgid "invalid warning threshold" msgstr "" -#: plugins/check_http.c:279 plugins/check_http.c:294 +#: plugins/check_http.c:282 plugins/check_http.c:297 msgid "check_http: invalid option - SSL is not available\n" msgstr "" -#: plugins/check_http.c:288 +#: plugins/check_http.c:291 msgid "invalid certificate expiration period" msgstr "" -#: plugins/check_http.c:309 +#: plugins/check_http.c:312 #, c-format msgid "option f:%d \n" msgstr "" -#: plugins/check_http.c:324 +#: plugins/check_http.c:327 msgid "invalid port number" msgstr "" -#: plugins/check_http.c:352 +#: plugins/check_http.c:358 msgid "check_http: call for regex which was not a compiled option\n" msgstr "" -#: plugins/check_http.c:366 +#: plugins/check_http.c:372 #, c-format msgid "Could Not Compile Regular Expression: %s" msgstr "" -#: plugins/check_http.c:378 plugins/check_ldap.c:241 plugins/check_ping.c:222 -#: plugins/check_smtp.c:294 plugins/check_ssh.c:128 plugins/check_tcp.c:421 +#: plugins/check_http.c:384 plugins/check_ldap.c:241 plugins/check_ping.c:224 +#: plugins/check_smtp.c:366 plugins/check_ssh.c:128 plugins/check_tcp.c:425 msgid "IPv6 support not available\n" msgstr "" -#: plugins/check_http.c:400 +#: plugins/check_http.c:406 msgid "check_http: you must specify a server address or host name\n" msgstr "" -#: plugins/check_http.c:488 plugins/check_http.c:503 +#: plugins/check_http.c:494 plugins/check_http.c:509 msgid "Unable to open TCP socket\n" msgstr "" -#: plugins/check_http.c:561 +#: plugins/check_http.c:571 msgid "Client Certificate Required\n" msgstr "" -#: plugins/check_http.c:563 plugins/check_http.c:568 +#: plugins/check_http.c:573 plugins/check_http.c:578 msgid "Error in recv()\n" msgstr "" -#: plugins/check_http.c:576 +#: plugins/check_http.c:586 #, c-format msgid "No data received %s\n" msgstr "" -#: plugins/check_http.c:620 +#: plugins/check_http.c:630 msgid "Invalid HTTP response received from host\n" msgstr "" -#: plugins/check_http.c:623 +#: plugins/check_http.c:633 #, c-format msgid "Invalid HTTP response received from host on port %d\n" msgstr "" -#: plugins/check_http.c:631 +#: plugins/check_http.c:641 #, c-format msgid "HTTP OK: Status line output matched \"%s\"\n" msgstr "" -#: plugins/check_http.c:643 +#: plugins/check_http.c:653 #, c-format msgid "HTTP CRITICAL: Invalid Status Line (%s)\n" msgstr "" -#: plugins/check_http.c:650 +#: plugins/check_http.c:660 #, c-format msgid "HTTP CRITICAL: Invalid Status (%s)\n" msgstr "" -#: plugins/check_http.c:654 +#: plugins/check_http.c:664 #, c-format msgid "HTTP CRITICAL: %s\n" msgstr "" -#: plugins/check_http.c:658 +#: plugins/check_http.c:668 #, c-format msgid "HTTP WARNING: %s\n" msgstr "" -#: plugins/check_http.c:666 -msgid "UNKNOWN" -msgstr "" - -#: plugins/check_http.c:668 plugins/check_http.c:918 plugins/check_procs.c:249 -msgid "OK" -msgstr "" - -#: plugins/check_http.c:670 plugins/check_procs.c:251 -msgid "WARNING" -msgstr "" - -#: plugins/check_http.c:672 plugins/check_procs.c:256 -msgid "CRITICAL" -msgstr "" - -#: plugins/check_http.c:676 +#: plugins/check_http.c:686 #, c-format msgid " - %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:688 +#: plugins/check_http.c:698 #, c-format msgid "HTTP problem: %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:702 plugins/check_http.c:719 +#: plugins/check_http.c:712 plugins/check_http.c:729 #, c-format msgid "HTTP OK %s - %.3f second response time %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:709 +#: plugins/check_http.c:719 #, c-format msgid "CRITICAL - string not found%s|%s %s\n" msgstr "" -#: plugins/check_http.c:727 +#: plugins/check_http.c:737 #, c-format msgid "CRITICAL - pattern not found%s|%s %s\n" msgstr "" -#: plugins/check_http.c:734 +#: plugins/check_http.c:744 #, c-format msgid "CRITICAL - Execute Error: %s\n" msgstr "" -#: plugins/check_http.c:744 +#: plugins/check_http.c:754 #, c-format msgid "HTTP WARNING: page size %d too small%s|%s\n" msgstr "" -#: plugins/check_http.c:749 +#: plugins/check_http.c:759 #, c-format msgid "HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n" msgstr "" -#: plugins/check_http.c:785 +#: plugins/check_http.c:795 msgid "ERROR: could not allocate addr\n" msgstr "" -#: plugins/check_http.c:789 plugins/check_http.c:809 +#: plugins/check_http.c:799 plugins/check_http.c:819 msgid "ERROR: could not allocate url\n" msgstr "" -#: plugins/check_http.c:799 +#: plugins/check_http.c:809 #, c-format msgid "UNKNOWN - Could not find redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:852 +#: plugins/check_http.c:862 #, c-format msgid "UNKNOWN - Could not parse redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:862 +#: plugins/check_http.c:872 #, c-format msgid "WARNING - maximum redirection depth %d exceeded - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:870 +#: plugins/check_http.c:880 #, c-format msgid "WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:918 +#: plugins/check_http.c:928 #, c-format msgid "SSL seeding: %s\n" msgstr "" -#: plugins/check_http.c:918 +#: plugins/check_http.c:928 msgid "Failed" msgstr "" -#: plugins/check_http.c:925 +#: plugins/check_http.c:935 msgid "CRITICAL - Cannot create SSL context.\n" msgstr "" -#: plugins/check_http.c:949 +#: plugins/check_http.c:959 msgid "CRITICAL - Cannot initiate SSL handshake.\n" msgstr "" -#: plugins/check_http.c:977 plugins/check_http.c:989 +#: plugins/check_http.c:987 plugins/check_http.c:999 msgid "CRITICAL - Wrong time format in certificate.\n" msgstr "" -#: plugins/check_http.c:1018 +#: plugins/check_http.c:1028 #, c-format msgid "WARNING - Certificate expires in %d day(s) (%s).\n" msgstr "" -#: plugins/check_http.c:1022 +#: plugins/check_http.c:1032 #, c-format msgid "CRITICAL - Certificate expired on %s.\n" msgstr "" -#: plugins/check_http.c:1027 +#: plugins/check_http.c:1037 #, c-format msgid "WARNING - Certificate expires today (%s).\n" msgstr "" -#: plugins/check_http.c:1031 +#: plugins/check_http.c:1041 #, c-format msgid "OK - Certificate will expire on %s.\n" msgstr "" -#: plugins/check_http.c:1106 +#: plugins/check_http.c:1116 msgid "" "This plugin tests the HTTP service on the specified host. It can test\n" "normal (http) and secure (https) servers, follow redirects, search for\n" @@ -1015,11 +1062,11 @@ msgid "" "certificate expiration times.\n" msgstr "" -#: plugins/check_http.c:1114 +#: plugins/check_http.c:1124 msgid "NOTE: One or both of -H and -I must be specified\n" msgstr "" -#: plugins/check_http.c:1118 +#: plugins/check_http.c:1128 #, fuzzy, c-format msgid "" " -H, --hostname=ADDRESS\n" @@ -1040,7 +1087,7 @@ msgstr "" " -6, --use-ipv6\n" " Use IPv6 connection\n" -#: plugins/check_http.c:1129 +#: plugins/check_http.c:1139 msgid "" " -S, --ssl\n" " Connect via SSL\n" @@ -1049,7 +1096,7 @@ msgid "" " (when this option is used the url is not checked.)\n" msgstr "" -#: plugins/check_http.c:1137 +#: plugins/check_http.c:1147 #, c-format msgid "" " -e, --expect=STRING\n" @@ -1062,9 +1109,11 @@ msgid "" " URL to GET or POST (default: /)\n" " -P, --post=STRING\n" " URL encoded http POST data\n" +" -T, --content-type=STRING\n" +" specify Content-Type header media type when POSTing\n" msgstr "" -#: plugins/check_http.c:1149 +#: plugins/check_http.c:1161 msgid "" " -l, --linespan\n" " Allow regex to span newlines (must precede -r or -R)\n" @@ -1074,7 +1123,7 @@ msgid "" " Search page for case-insensitive regex STRING\n" msgstr "" -#: plugins/check_http.c:1158 +#: plugins/check_http.c:1170 msgid "" " -a, --authorization=AUTH_PAIR\n" " Username:password on sites with basic authentication\n" @@ -1086,7 +1135,7 @@ msgid "" " Minimum page size required (bytes)\n" msgstr "" -#: plugins/check_http.c:1174 +#: plugins/check_http.c:1186 msgid "" "This plugin will attempt to open an HTTP connection with the host. " "Successful\n" @@ -1098,7 +1147,7 @@ msgid "" "(fully qualified domain name) as the [host_name] argument.\n" msgstr "" -#: plugins/check_http.c:1183 +#: plugins/check_http.c:1195 msgid "" "\n" "This plugin can also check whether an SSL enabled web server is able to\n" @@ -1106,7 +1155,7 @@ msgid "" "certificate is still valid for the specified number of days.\n" msgstr "" -#: plugins/check_http.c:1187 +#: plugins/check_http.c:1199 msgid "" "\n" "CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" @@ -1119,7 +1168,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_http.c:1194 +#: plugins/check_http.c:1206 msgid "" "CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" "\n" @@ -1132,7 +1181,7 @@ msgid "" "the certificate is expired.\n" msgstr "" -#: plugins/check_http.c:1212 +#: plugins/check_http.c:1224 #, c-format msgid "" "Usage: %s (-H | -I ) [-u ] [-p ]\n" @@ -1412,43 +1461,43 @@ msgstr "" msgid "Unable to process MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:123 plugins/check_mrtgtraf.c:121 +#: plugins/check_mrtg.c:123 plugins/check_mrtgtraf.c:120 #, c-format msgid "MRTG data has expired (%d minutes old)\n" msgstr "" -#: plugins/check_mrtg.c:143 -msgid "Ave" +#: plugins/check_mrtg.c:141 plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtgtraf.c:180 +msgid "Avg" msgstr "" -#: plugins/check_mrtg.c:143 plugins/check_mrtgtraf.c:175 -#: plugins/check_mrtgtraf.c:183 plugins/check_mrtgtraf.c:184 -#: plugins/check_mrtgtraf.c:189 plugins/check_mrtgtraf.c:190 +#: plugins/check_mrtg.c:141 plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtgtraf.c:180 msgid "Max" msgstr "" -#: plugins/check_mrtg.c:207 plugins/check_mrtg.c:259 +#: plugins/check_mrtg.c:211 plugins/check_mrtg.c:263 msgid "Invalid variable number\n" msgstr "" -#: plugins/check_mrtg.c:242 +#: plugins/check_mrtg.c:246 #, c-format msgid "" "%s is not a valid expiration time\n" "Use '%s -h' for additional help\n" msgstr "" -#: plugins/check_mrtg.c:286 +#: plugins/check_mrtg.c:290 msgid "You must supply the variable number\n" msgstr "" -#: plugins/check_mrtg.c:310 +#: plugins/check_mrtg.c:314 msgid "" "This plugin will check either the average or maximum value of one of the\n" "two variables recorded in an MRTG log file.\n" msgstr "" -#: plugins/check_mrtg.c:318 +#: plugins/check_mrtg.c:322 msgid "" " -F, --logfile=FILE\n" " The MRTG log file containing the data you want to monitor\n" @@ -1464,7 +1513,7 @@ msgid "" " Threshold value for data to result in CRITICAL status\n" msgstr "" -#: plugins/check_mrtg.c:332 +#: plugins/check_mrtg.c:336 #, c-format msgid "" " -l, --label=STRING\n" @@ -1474,7 +1523,7 @@ msgid "" " \"Bytes Per Second\", \"%% Utilization\")\n" msgstr "" -#: plugins/check_mrtg.c:339 +#: plugins/check_mrtg.c:343 msgid "" "If the value exceeds the threshold, a WARNING status is returned. If\n" "the value exceeds the threshold, a CRITICAL status is returned. If\n" @@ -1483,7 +1532,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtg.c:345 +#: plugins/check_mrtg.c:349 msgid "" "This plugin is useful for monitoring MRTG data that does not correspond to\n" "bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth).\n" @@ -1495,7 +1544,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtg.c:352 +#: plugins/check_mrtg.c:356 msgid "" "Notes:\n" "- This plugin only monitors one of the two variables stored in the MRTG log\n" @@ -1507,40 +1556,24 @@ msgid "" " http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" msgstr "" -#: plugins/check_mrtg.c:372 +#: plugins/check_mrtg.c:376 #, c-format msgid "" "Usage: %s -F log_file -a -v variable -w warning -c critical\n" " [-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n" msgstr "" -#: plugins/check_mrtgtraf.c:174 +#: plugins/check_mrtgtraf.c:178 #, c-format -msgid "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s" +msgid "%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:175 plugins/check_mrtgtraf.c:183 -#: plugins/check_mrtgtraf.c:184 plugins/check_mrtgtraf.c:189 -#: plugins/check_mrtgtraf.c:190 -msgid "Avg" -msgstr "" - -#: plugins/check_mrtgtraf.c:182 -#, c-format -msgid "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s" -msgstr "" - -#: plugins/check_mrtgtraf.c:188 +#: plugins/check_mrtgtraf.c:191 #, c-format -msgid "Traffic OK - %s. In = %0.1f %s, %s. Out = %0.1f %s\n" +msgid "Traffic %s - %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:193 -#, c-format -msgid "UNKNOWN %s\n" -msgstr "" - -#: plugins/check_mrtgtraf.c:332 +#: plugins/check_mrtgtraf.c:330 msgid "" " -F, --filename=STRING\n" " File to read log from\n" @@ -1554,7 +1587,7 @@ msgid "" " Critical threshold pair \",\"\n" msgstr "" -#: plugins/check_mrtgtraf.c:344 +#: plugins/check_mrtgtraf.c:342 msgid "" "\n" "This plugin will check the incoming/outgoing transfer rates of a router,\n" @@ -1566,7 +1599,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_mrtgtraf.c:352 +#: plugins/check_mrtgtraf.c:350 msgid "" "Notes:\n" "- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n" @@ -1578,7 +1611,7 @@ msgid "" " for future enhancements of this plugin.\n" msgstr "" -#: plugins/check_mrtgtraf.c:370 +#: plugins/check_mrtgtraf.c:368 #, c-format msgid "" "Usage: %s -F -a -v -w -c " @@ -1616,53 +1649,53 @@ msgstr "" msgid "Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password]\n" msgstr "" -#: plugins/check_nagios.c:78 +#: plugins/check_nagios.c:81 msgid "Error: Cannot open status log for reading!\n" msgstr "" -#: plugins/check_nagios.c:116 +#: plugins/check_nagios.c:138 #, c-format -msgid "Found process: %s\n" +msgid "Found process: %s %s\n" msgstr "" -#: plugins/check_nagios.c:136 +#: plugins/check_nagios.c:159 msgid "Could not locate a running Nagios process!\n" msgstr "" -#: plugins/check_nagios.c:147 +#: plugins/check_nagios.c:170 #, c-format msgid "Nagios %s: located %d process%s, status log updated %d second%s ago\n" msgstr "" -#: plugins/check_nagios.c:186 plugins/check_nagios.c:220 +#: plugins/check_nagios.c:209 plugins/check_nagios.c:243 #, c-format msgid "" "Expiration time must be an integer (seconds)\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:200 +#: plugins/check_nagios.c:223 #, c-format msgid "" "%s: Unknown argument: %c\n" "\n" msgstr "" -#: plugins/check_nagios.c:232 +#: plugins/check_nagios.c:255 #, c-format msgid "" "You must provide the status_log\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:236 +#: plugins/check_nagios.c:259 #, c-format msgid "" "You must provide a process string\n" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nagios.c:254 +#: plugins/check_nagios.c:277 msgid "" "This plugin attempts to check the status of the Nagios process on the local\n" "machine. The plugin will check to make sure the Nagios status log is no " @@ -1674,7 +1707,7 @@ msgid "" "by the argument.\n" msgstr "" -#: plugins/check_nagios.c:265 +#: plugins/check_nagios.c:288 msgid "" "-F, --filename=FILE\n" " Name of the log file to check\n" @@ -1684,90 +1717,125 @@ msgid "" " Command to search for in process table\n" msgstr "" -#: plugins/check_nagios.c:273 +#: plugins/check_nagios.c:296 msgid "" "Example:\n" " ./check_nagios -e 5 \\ -F /usr/local/nagios/var/status.log \\ -C /usr/" "local/nagios/bin/nagios\n" msgstr "" -#: plugins/check_nagios.c:286 +#: plugins/check_nagios.c:309 #, c-format msgid "" "Usage: %s -F -e -C \n" msgstr "" -#: plugins/check_nt.c:118 +#: plugins/check_nt.c:127 #, c-format msgid "Wrong client version - running: %s, required: %s" msgstr "" -#: plugins/check_nt.c:129 plugins/check_nt.c:182 +#: plugins/check_nt.c:138 plugins/check_nt.c:198 msgid "missing -l parameters" msgstr "" -#: plugins/check_nt.c:131 +#: plugins/check_nt.c:140 msgid "wrong -l parameter." msgstr "" -#: plugins/check_nt.c:135 +#: plugins/check_nt.c:144 msgid "CPU Load" msgstr "" -#: plugins/check_nt.c:156 +#: plugins/check_nt.c:145 +msgid " " +msgstr "" + +#: plugins/check_nt.c:167 #, c-format msgid " %lu%% (%lu min average)" msgstr "" -#: plugins/check_nt.c:163 +#: plugins/check_nt.c:169 +#, c-format +msgid " '%lu min avg Load'=%lu%%;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nt.c:179 msgid "not enough values for -l parameters" msgstr "" -#: plugins/check_nt.c:175 +#: plugins/check_nt.c:191 #, c-format msgid "System Uptime : %u day(s) %u hour(s) %u minute(s)" msgstr "" -#: plugins/check_nt.c:184 +#: plugins/check_nt.c:200 msgid "wrong -l argument" msgstr "" -#: plugins/check_nt.c:193 +#: plugins/check_nt.c:211 #, c-format msgid "%s:\\ - total: %.2f Gb - used: %.2f Gb (%.0f%%) - free %.2f Gb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:208 +#: plugins/check_nt.c:214 +#, c-format +msgid "'%s:\\ Used Space'=%.2fGb;%.2f;%.2f;0.00;%.2f" +msgstr "" + +#: plugins/check_nt.c:228 msgid "Free disk space : Invalid drive " msgstr "" -#: plugins/check_nt.c:218 +#: plugins/check_nt.c:238 msgid "No service/process specified" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:242 msgid "ShowAll" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:242 msgid "ShowFail" msgstr "" -#: plugins/check_nt.c:237 +#: plugins/check_nt.c:262 #, c-format msgid "" "Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:253 plugins/check_nt.c:289 +#: plugins/check_nt.c:265 +#, c-format +msgid "'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f" +msgstr "" + +#: plugins/check_nt.c:301 plugins/check_nt.c:383 msgid "No counter specified" msgstr "" #: plugins/check_nt.c:319 +msgid "%" +msgstr "" + +#: plugins/check_nt.c:334 +msgid "Minimum value contains non-numbers" +msgstr "" + +#: plugins/check_nt.c:338 +msgid "Maximum value contains non-numbers" +msgstr "" + +#: plugins/check_nt.c:345 +msgid "No unit counter specified" +msgstr "" + +#: plugins/check_nt.c:413 msgid "Please specify a variable to check" msgstr "" -#: plugins/check_nt.c:404 plugins/check_nwstat.c:775 +#: plugins/check_nt.c:500 plugins/check_nwstat.c:781 #: plugins/check_overcr.c:352 #, c-format msgid "" @@ -1775,11 +1843,11 @@ msgid "" "Type '%s -h' for additional help\n" msgstr "" -#: plugins/check_nt.c:457 +#: plugins/check_nt.c:553 msgid "None" msgstr "" -#: plugins/check_nt.c:516 +#: plugins/check_nt.c:612 msgid "" "Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n" "\n" @@ -1788,7 +1856,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_nt.c:521 +#: plugins/check_nt.c:617 #, c-format msgid "" "\n" @@ -1811,19 +1879,19 @@ msgid "" " Print version information\n" msgstr "" -#: plugins/check_nt.c:539 +#: plugins/check_nt.c:635 msgid "" "-v, --variable=STRING\n" " Variable to check. Valid variables are:\n" msgstr "" -#: plugins/check_nt.c:542 +#: plugins/check_nt.c:638 msgid "" " CLIENTVERSION = Get the NSClient version\n" " If -l is specified, will return warning if versions differ.\n" msgstr "" -#: plugins/check_nt.c:545 +#: plugins/check_nt.c:641 msgid "" " CPULOAD = Average CPU load on last x minutes.\n" " Request a -l parameter with the following syntax:\n" @@ -1834,26 +1902,26 @@ msgid "" " ie: -l 60,90,95,120,90,95\n" msgstr "" -#: plugins/check_nt.c:552 +#: plugins/check_nt.c:648 msgid "" " UPTIME = Get the uptime of the machine.\n" " No specific parameters. No warning or critical threshold\n" msgstr "" -#: plugins/check_nt.c:555 +#: plugins/check_nt.c:651 msgid "" " USEDDISKSPACE = Size and percentage of disk use.\n" " Request a -l parameter containing the drive letter only.\n" " Warning and critical thresholds can be specified with -w and -c.\n" msgstr "" -#: plugins/check_nt.c:559 +#: plugins/check_nt.c:655 msgid "" " MEMUSE = Memory use.\n" " Warning and critical thresholds can be specified with -w and -c.\n" msgstr "" -#: plugins/check_nt.c:562 +#: plugins/check_nt.c:658 msgid "" " SERVICESTATE = Check the state of one or several services.\n" " Request a -l parameters with the following syntax:\n" @@ -1862,13 +1930,13 @@ msgid "" "\t\t in the returned string.\n" msgstr "" -#: plugins/check_nt.c:568 +#: plugins/check_nt.c:664 msgid "" " PROCSTATE = Check if one or several process are running.\n" " Same syntax as SERVICESTATE.\n" msgstr "" -#: plugins/check_nt.c:571 +#: plugins/check_nt.c:667 #, c-format msgid "" " COUNTER = Check any performance counter of Windows NT/2000.\n" @@ -1881,7 +1949,7 @@ msgid "" " \"%%.f %%%% paging file used.\"\n" msgstr "" -#: plugins/check_nt.c:580 +#: plugins/check_nt.c:676 msgid "" "Notes:\n" " - The NSClient service should be running on the server to get any " @@ -1890,191 +1958,191 @@ msgid "" " - Critical thresholds should be lower than warning thresholds\n" msgstr "" -#: plugins/check_nt.c:591 +#: plugins/check_nt.c:687 #, c-format msgid "" "Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n" " [-l params] [-d SHOWALL] [-t timeout]\n" msgstr "" -#: plugins/check_nwstat.c:143 +#: plugins/check_nwstat.c:147 #, c-format msgid "NetWare %s: " msgstr "" -#: plugins/check_nwstat.c:174 +#: plugins/check_nwstat.c:178 #, c-format msgid "Up %s," msgstr "" -#: plugins/check_nwstat.c:182 +#: plugins/check_nwstat.c:186 #, c-format msgid "Load %s - %s %s-min load average = %lu%%" msgstr "" -#: plugins/check_nwstat.c:203 +#: plugins/check_nwstat.c:207 #, c-format msgid "Conns %s - %lu current connections" msgstr "" -#: plugins/check_nwstat.c:222 +#: plugins/check_nwstat.c:226 #, c-format msgid "%s: Long term cache hits = %lu%%" msgstr "" -#: plugins/check_nwstat.c:241 +#: plugins/check_nwstat.c:245 #, c-format msgid "%s: Total cache buffers = %lu" msgstr "" -#: plugins/check_nwstat.c:260 +#: plugins/check_nwstat.c:264 #, c-format msgid "%s: Dirty cache buffers = %lu" msgstr "" -#: plugins/check_nwstat.c:279 +#: plugins/check_nwstat.c:283 #, c-format msgid "%s: LRU sitting time = %lu minutes" msgstr "" -#: plugins/check_nwstat.c:293 plugins/check_nwstat.c:318 -#: plugins/check_nwstat.c:438 plugins/check_nwstat.c:459 -#: plugins/check_nwstat.c:491 plugins/check_nwstat.c:512 +#: plugins/check_nwstat.c:297 plugins/check_nwstat.c:322 +#: plugins/check_nwstat.c:442 plugins/check_nwstat.c:463 +#: plugins/check_nwstat.c:495 plugins/check_nwstat.c:516 #, c-format msgid "Error: Volume '%s' does not exist!" msgstr "" -#: plugins/check_nwstat.c:302 +#: plugins/check_nwstat.c:306 #, c-format msgid "%s%lu KB free on volume %s" msgstr "" -#: plugins/check_nwstat.c:303 plugins/check_nwstat.c:446 -#: plugins/check_nwstat.c:499 +#: plugins/check_nwstat.c:307 plugins/check_nwstat.c:450 +#: plugins/check_nwstat.c:503 msgid "Only " msgstr "" -#: plugins/check_nwstat.c:338 +#: plugins/check_nwstat.c:342 #, c-format msgid "%lu MB (%lu%%) free on volume %s" msgstr "" -#: plugins/check_nwstat.c:357 +#: plugins/check_nwstat.c:361 #, c-format msgid "Directory Services Database is %s (DS version %s)" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 #, c-format msgid "Logins are %s" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 msgid "enabled" msgstr "" -#: plugins/check_nwstat.c:371 +#: plugins/check_nwstat.c:375 msgid "disabled" msgstr "" -#: plugins/check_nwstat.c:404 +#: plugins/check_nwstat.c:408 #, c-format msgid "%lu of %lu (%lu%%) packet receive buffers used" msgstr "" -#: plugins/check_nwstat.c:425 +#: plugins/check_nwstat.c:429 #, c-format msgid "%lu entries in SAP table" msgstr "" -#: plugins/check_nwstat.c:427 +#: plugins/check_nwstat.c:431 #, c-format msgid "%lu entries in SAP table for SAP type %d" msgstr "" -#: plugins/check_nwstat.c:446 +#: plugins/check_nwstat.c:450 #, c-format msgid "%s%lu KB purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:479 +#: plugins/check_nwstat.c:483 #, c-format msgid "%lu MB (%lu%%) purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:499 +#: plugins/check_nwstat.c:503 #, c-format msgid "%s%lu KB not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:532 +#: plugins/check_nwstat.c:536 #, c-format msgid "%lu MB (%lu%%) not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:550 +#: plugins/check_nwstat.c:554 #, c-format msgid "%lu open files" msgstr "" -#: plugins/check_nwstat.c:567 +#: plugins/check_nwstat.c:571 #, c-format msgid "%lu abended threads" msgstr "" -#: plugins/check_nwstat.c:592 +#: plugins/check_nwstat.c:596 #, c-format msgid "%lu current service processes (%lu max)" msgstr "" -#: plugins/check_nwstat.c:608 +#: plugins/check_nwstat.c:612 msgid "Critical: Time not in sync with network!" msgstr "" -#: plugins/check_nwstat.c:611 +#: plugins/check_nwstat.c:615 msgid "OK! Time in sync with network!" msgstr "" -#: plugins/check_nwstat.c:627 +#: plugins/check_nwstat.c:631 #, c-format msgid "LRU sitting time = %lu seconds" msgstr "" -#: plugins/check_nwstat.c:643 +#: plugins/check_nwstat.c:647 #, c-format msgid "dirty cache buffers = %lu%% of the total" msgstr "" -#: plugins/check_nwstat.c:658 +#: plugins/check_nwstat.c:662 #, c-format msgid "total cache buffers = %lu%% of the original" msgstr "" -#: plugins/check_nwstat.c:668 +#: plugins/check_nwstat.c:672 #, c-format msgid "NDS Version %s" msgstr "" -#: plugins/check_nwstat.c:677 +#: plugins/check_nwstat.c:681 #, c-format msgid "Up %s" msgstr "" -#: plugins/check_nwstat.c:687 +#: plugins/check_nwstat.c:691 #, c-format msgid "Module %s version %s is loaded" msgstr "" -#: plugins/check_nwstat.c:690 +#: plugins/check_nwstat.c:694 #, c-format msgid "Module %s is not loaded" msgstr "" -#: plugins/check_nwstat.c:695 plugins/check_overcr.c:270 +#: plugins/check_nwstat.c:699 plugins/check_overcr.c:270 msgid "Nothing to check!\n" msgstr "" -#: plugins/check_nwstat.c:906 +#: plugins/check_nwstat.c:912 #, c-format msgid "" "Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n" @@ -2082,7 +2150,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_nwstat.c:917 +#: plugins/check_nwstat.c:923 msgid "" " -v, --variable=STRING\n" " Variable to check. Valid variables include:\n" @@ -2094,7 +2162,7 @@ msgid "" " UPTIME = server uptime\n" msgstr "" -#: plugins/check_nwstat.c:927 +#: plugins/check_nwstat.c:933 msgid "" " LTCH = percent long term cache hits\n" " CBUFF = current number of cache buffers\n" @@ -2103,7 +2171,7 @@ msgid "" " TCB = dirty cache buffers as a percentage of the original\n" msgstr "" -#: plugins/check_nwstat.c:934 +#: plugins/check_nwstat.c:940 msgid "" " OFILES = number of open files\n" " VPF = percent free space on volume \n" @@ -2114,7 +2182,7 @@ msgid "" " VKNP = KB of not yet purgeable space on volume \n" msgstr "" -#: plugins/check_nwstat.c:943 +#: plugins/check_nwstat.c:949 msgid "" " LRUM = LRU sitting time in minutes\n" " LRUS = LRU sitting time in seconds\n" @@ -2126,7 +2194,7 @@ msgid "" " SAPENTRIES = number of entries in the SAP table for SAP type \n" msgstr "" -#: plugins/check_nwstat.c:953 +#: plugins/check_nwstat.c:959 msgid "" " TSYNC = timesync status \n" " LOGINS = check to see if logins are enabled\n" @@ -2135,7 +2203,7 @@ msgid "" " (e.g. \"NLM:TSANDS.NLM\")\n" msgstr "" -#: plugins/check_nwstat.c:960 +#: plugins/check_nwstat.c:966 msgid "" " -w, --warning=INTEGER\n" " Threshold which will result in a warning status\n" @@ -2145,7 +2213,7 @@ msgid "" " Include server version string in results\n" msgstr "" -#: plugins/check_nwstat.c:970 +#: plugins/check_nwstat.c:976 msgid "" "\n" "Notes:\n" @@ -2157,7 +2225,7 @@ msgid "" " TCB, LRUS and LRUM.\n" msgstr "" -#: plugins/check_nwstat.c:987 +#: plugins/check_nwstat.c:993 #, c-format msgid "" "Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n" @@ -2274,182 +2342,172 @@ msgstr "" msgid "PGSQL: CRITICAL - no connection to '%s' (%s).\n" msgstr "" -#: plugins/check_pgsql.c:161 +#: plugins/check_pgsql.c:169 #, c-format -msgid "PGSQL: CRITICAL - database %s (%d sec.)\n" +msgid "PGSQL: %s - database %s (%d sec.)|%s\n" msgstr "" -#: plugins/check_pgsql.c:167 -#, c-format -msgid "PGSQL: WARNING - database %s (%d sec.)\n" -msgstr "" - -#: plugins/check_pgsql.c:172 -#, c-format -msgid "PGSQL: ok - database %s (%d sec.)\n" -msgstr "" - -#: plugins/check_pgsql.c:220 plugins/check_snmp.c:449 plugins/negate.c:183 +#: plugins/check_pgsql.c:219 plugins/check_snmp.c:449 plugins/negate.c:183 msgid "Timeout Interval must be an integer" msgstr "" -#: plugins/check_pgsql.c:226 plugins/check_pgsql.c:232 +#: plugins/check_pgsql.c:225 plugins/check_pgsql.c:231 msgid "Invalid critical threshold" msgstr "" -#: plugins/check_pgsql.c:238 +#: plugins/check_pgsql.c:237 msgid "You gave an invalid host name" msgstr "" -#: plugins/check_pgsql.c:244 +#: plugins/check_pgsql.c:243 msgid "Port must be an integer" msgstr "" -#: plugins/check_pgsql.c:250 +#: plugins/check_pgsql.c:249 msgid "Database name is not valid" msgstr "" -#: plugins/check_pgsql.c:256 +#: plugins/check_pgsql.c:255 msgid "user name is not valid" msgstr "" -#: plugins/check_pgsql.c:390 +#: plugins/check_pgsql.c:389 msgid "" "Test whether a PostgreSQL DBMS is accepting connections.\n" "\n" msgstr "" -#: plugins/check_ping.c:80 +#: plugins/check_ping.c:82 msgid "Could not parse arguments" msgstr "" -#: plugins/check_ping.c:123 +#: plugins/check_ping.c:124 msgid "Error: Could not interpret output from ping command\n" msgstr "" -#: plugins/check_ping.c:139 +#: plugins/check_ping.c:140 #, c-format msgid "PING %s - %sPacket loss = %d%%" msgstr "" -#: plugins/check_ping.c:142 +#: plugins/check_ping.c:143 #, c-format msgid "PING %s - %sPacket loss = %d%%, RTA = %2.2f ms" msgstr "" -#: plugins/check_ping.c:233 +#: plugins/check_ping.c:235 msgid "Could not realloc() addresses\n" msgstr "" -#: plugins/check_ping.c:248 plugins/check_ping.c:328 +#: plugins/check_ping.c:250 plugins/check_ping.c:331 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:271 +#: plugins/check_ping.c:273 #, c-format msgid "" "Invalid host name/address: %s\n" "\n" msgstr "" -#: plugins/check_ping.c:282 +#: plugins/check_ping.c:285 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:293 +#: plugins/check_ping.c:296 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:304 +#: plugins/check_ping.c:307 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:315 +#: plugins/check_ping.c:318 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:346 +#: plugins/check_ping.c:349 #, c-format msgid "" "%s: Warning threshold must be integer or percentage!\n" "\n" msgstr "" -#: plugins/check_ping.c:357 +#: plugins/check_ping.c:360 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:361 +#: plugins/check_ping.c:364 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:365 +#: plugins/check_ping.c:368 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:369 +#: plugins/check_ping.c:372 msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:373 +#: plugins/check_ping.c:376 #, c-format msgid " (%f) cannot be larger than (%f)\n" msgstr "" -#: plugins/check_ping.c:377 +#: plugins/check_ping.c:380 #, c-format msgid " (%d) cannot be larger than (%d)\n" msgstr "" -#: plugins/check_ping.c:390 +#: plugins/check_ping.c:393 msgid "Invalid host name/address" msgstr "" -#: plugins/check_ping.c:408 +#: plugins/check_ping.c:411 #, c-format msgid "Cannot open pipe: %s" msgstr "" -#: plugins/check_ping.c:412 +#: plugins/check_ping.c:415 #, c-format msgid "Cannot open stderr for %s\n" msgstr "" -#: plugins/check_ping.c:468 +#: plugins/check_ping.c:471 #, c-format msgid "PING CRITICAL - Network unreachable (%s)" msgstr "" -#: plugins/check_ping.c:470 +#: plugins/check_ping.c:473 #, c-format msgid "PING CRITICAL - Host Unreachable (%s)" msgstr "" -#: plugins/check_ping.c:472 +#: plugins/check_ping.c:475 #, c-format msgid "PING CRITICAL - Host not found (%s)" msgstr "" -#: plugins/check_ping.c:479 +#: plugins/check_ping.c:482 msgid "unable to realloc warn_text" msgstr "" -#: plugins/check_ping.c:505 plugins/check_procs.c:586 +#: plugins/check_ping.c:508 plugins/check_procs.c:582 msgid "Copyright (c) 1999 Ethan Galstad " msgstr "" -#: plugins/check_ping.c:508 +#: plugins/check_ping.c:511 msgid "" "Use ping to check connection statistics for a remote host.\n" "\n" msgstr "" -#: plugins/check_ping.c:516 +#: plugins/check_ping.c:519 #, c-format msgid "" "-H, --hostname=HOST\n" @@ -2464,7 +2522,7 @@ msgid "" " show HTML in the plugin output (obsoleted by urlize)\n" msgstr "" -#: plugins/check_ping.c:531 +#: plugins/check_ping.c:534 #, c-format msgid "" "THRESHOLD is ,%% where is the round trip average travel\n" @@ -2473,7 +2531,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ping.c:536 +#: plugins/check_ping.c:539 msgid "" "This plugin uses the ping command to probe the specified host for packet " "loss\n" @@ -2485,169 +2543,168 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:116 +#: plugins/check_procs.c:120 msgid "Unable to parse command line\n" msgstr "" -#: plugins/check_procs.c:119 +#: plugins/check_procs.c:123 #, c-format msgid "CMD: %s\n" msgstr "" -#: plugins/check_procs.c:215 +#: plugins/check_procs.c:229 #, c-format msgid "Not parseable: %s" msgstr "" -#: plugins/check_procs.c:222 +#: plugins/check_procs.c:236 #, c-format msgid "STDERR: %s" msgstr "" -#: plugins/check_procs.c:224 +#: plugins/check_procs.c:238 msgid "System call sent warnings to stderr\n" msgstr "" -#: plugins/check_procs.c:231 +#: plugins/check_procs.c:245 msgid "System call returned nonzero status\n" msgstr "" -#: plugins/check_procs.c:236 plugins/check_users.c:96 +#: plugins/check_procs.c:250 plugins/check_users.c:99 msgid "Unable to read output\n" msgstr "" -#: plugins/check_procs.c:253 +#: plugins/check_procs.c:267 #, c-format msgid "%d warn out of " msgstr "" -#: plugins/check_procs.c:258 +#: plugins/check_procs.c:272 #, c-format msgid "%d crit, %d warn out of " msgstr "" -#: plugins/check_procs.c:261 +#: plugins/check_procs.c:275 #, c-format msgid "%d process" msgid_plural "%d processes" msgstr[0] "" msgstr[1] "" -#: plugins/check_procs.c:264 +#: plugins/check_procs.c:278 #, c-format msgid " with %s" msgstr "" -#: plugins/check_procs.c:328 plugins/check_ssh.c:117 +#: plugins/check_procs.c:342 plugins/check_ssh.c:117 msgid "" "Timeout Interval must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:342 +#: plugins/check_procs.c:356 msgid "" "Critical Process Count must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:354 -#, c-format +#: plugins/check_procs.c:368 msgid "" -"%s: Warning Process Count must be an integer!\n" +"Warning Process Count must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:362 +#: plugins/check_procs.c:376 #, c-format msgid "" "%s: Parent Process ID must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:371 plugins/check_procs.c:484 +#: plugins/check_procs.c:382 plugins/check_procs.c:480 #, c-format msgid "%s%sSTATE = %s" msgstr "" -#: plugins/check_procs.c:380 +#: plugins/check_procs.c:391 #, c-format -msgid "UID %d was not found\n" +msgid "UID %s was not found\n" msgstr "" -#: plugins/check_procs.c:389 +#: plugins/check_procs.c:397 #, c-format msgid "User name %s was not found\n" msgstr "" -#: plugins/check_procs.c:397 +#: plugins/check_procs.c:402 #, c-format msgid "%s%sUID = %d (%s)" msgstr "" -#: plugins/check_procs.c:406 +#: plugins/check_procs.c:411 #, c-format msgid "%s%scommand name '%s'" msgstr "" -#: plugins/check_procs.c:415 +#: plugins/check_procs.c:420 #, c-format msgid "%s%sargs '%s'" msgstr "" -#: plugins/check_procs.c:420 +#: plugins/check_procs.c:425 #, c-format msgid "%s%sRSS >= %d" msgstr "" -#: plugins/check_procs.c:424 +#: plugins/check_procs.c:429 #, c-format msgid "" "%s: RSS must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:430 +#: plugins/check_procs.c:432 #, c-format msgid "%s%sVSZ >= %d" msgstr "" -#: plugins/check_procs.c:434 +#: plugins/check_procs.c:436 #, c-format msgid "" "%s: VSZ must be an integer!\n" "\n" msgstr "" -#: plugins/check_procs.c:441 +#: plugins/check_procs.c:440 #, c-format msgid "%s%sPCPU >= %.2f" msgstr "" -#: plugins/check_procs.c:445 +#: plugins/check_procs.c:444 #, c-format msgid "" "%s: PCPU must be a float!\n" "\n" msgstr "" -#: plugins/check_procs.c:467 +#: plugins/check_procs.c:463 #, c-format msgid "" "%s: metric must be one of PROCS, VSZ, RSS, CPU!\n" "\n" msgstr "" -#: plugins/check_procs.c:504 +#: plugins/check_procs.c:500 #, c-format msgid "wmax (%d) cannot be greater than cmax (%d)\n" msgstr "" -#: plugins/check_procs.c:508 +#: plugins/check_procs.c:504 #, c-format msgid "wmin (%d) cannot be less than cmin (%d)\n" msgstr "" -#: plugins/check_procs.c:589 +#: plugins/check_procs.c:585 msgid "" "Checks all processes and generates WARNING or CRITICAL states if the " "specified\n" @@ -2658,7 +2715,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:596 +#: plugins/check_procs.c:592 msgid "" "\n" "Required Arguments:\n" @@ -2668,7 +2725,7 @@ msgid "" " Generate critical state if metric is outside this range\n" msgstr "" -#: plugins/check_procs.c:603 +#: plugins/check_procs.c:599 msgid "" "\n" "Optional Arguments:\n" @@ -2682,7 +2739,7 @@ msgid "" " Extra information. Up to 3 verbosity levels\n" msgstr "" -#: plugins/check_procs.c:614 +#: plugins/check_procs.c:610 msgid "" "\n" "Optional Filters:\n" @@ -2698,7 +2755,7 @@ msgid "" " Only scan for processes with rss higher than indicated.\n" msgstr "" -#: plugins/check_procs.c:627 +#: plugins/check_procs.c:623 msgid "" " -P, --pcpu=PCPU\n" " Only scan for processes with pcpu higher than indicated.\n" @@ -2710,7 +2767,7 @@ msgid "" " Only scan for exact matches of COMMAND (without path).\n" msgstr "" -#: plugins/check_procs.c:637 +#: plugins/check_procs.c:633 msgid "" "\n" "RANGEs are specified 'min:max' or 'min:' or ':max' (or 'max'). If\n" @@ -2719,7 +2776,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:642 +#: plugins/check_procs.c:638 msgid "" "This plugin checks the number of currently running processes and\n" "generates WARNING or CRITICAL states if the process count is outside\n" @@ -2729,7 +2786,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:649 +#: plugins/check_procs.c:645 msgid "" "Examples:\n" " check_procs -w 2:2 -c 2:1024 -C portsentry\n" @@ -2742,61 +2799,65 @@ msgid "" "\n" " check_procs -w 50000 -c 100000 --metric=VSZ\n" " Alert if vsz of any processes over 50K or 100K\n" +" check_procs -w 10 -c 20 --metric=CPU\n" +" Alert if cpu of any processes over 10% or 20%\n" "\n" msgstr "" -#: plugins/check_radius.c:116 +#: plugins/check_radius.c:117 msgid "Config file error" msgstr "" -#: plugins/check_radius.c:123 +#: plugins/check_radius.c:125 msgid "Out of Memory?" msgstr "" -#: plugins/check_radius.c:144 +#: plugins/check_radius.c:146 msgid "Timeout" msgstr "" -#: plugins/check_radius.c:146 +#: plugins/check_radius.c:148 msgid "Auth Error" msgstr "" -#: plugins/check_radius.c:148 +#: plugins/check_radius.c:150 msgid "Auth Failed" msgstr "" -#: plugins/check_radius.c:152 +#: plugins/check_radius.c:154 msgid "Auth OK" msgstr "" -#: plugins/check_radius.c:190 plugins/check_radius.c:261 +#: plugins/check_radius.c:193 plugins/check_radius.c:267 msgid "Timeout interval must be a positive integer" msgstr "" -#: plugins/check_radius.c:194 plugins/check_radius.c:255 +#: plugins/check_radius.c:197 plugins/check_radius.c:261 msgid "Number of retries must be a positive integer" msgstr "" -#: plugins/check_radius.c:199 plugins/check_radius.c:237 +#: plugins/check_radius.c:202 plugins/check_radius.c:240 msgid "Server port must be a positive integer" msgstr "" -#: plugins/check_radius.c:281 +#: plugins/check_radius.c:287 msgid "Copyright (c) 1999 Robert August Vincent II\n" msgstr "" -#: plugins/check_radius.c:284 +#: plugins/check_radius.c:290 msgid "" "Tests to see if a radius server is accepting connections.\n" "\n" msgstr "" -#: plugins/check_radius.c:292 +#: plugins/check_radius.c:298 msgid "" " -u, --username=STRING\n" " The user to authenticate\n" " -p, --password=STRING\n" " Password for autentication (SECURITY RISK)\n" +" -n, --nas-id=STRING\n" +" NAS identifier\n" " -F, --filename=STRING\n" " Configuration file\n" " -e, --expect=STRING\n" @@ -2805,7 +2866,7 @@ msgid "" " Number of times to retry a failed connection\n" msgstr "" -#: plugins/check_radius.c:306 +#: plugins/check_radius.c:314 msgid "" "\n" "This plugin tests a radius server to see if it is accepting connections.\n" @@ -2816,7 +2877,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_radius.c:313 +#: plugins/check_radius.c:321 msgid "" "The password option presents a substantial security issue because the\n" "password can be determined by careful watching of the command line in\n" @@ -2854,19 +2915,19 @@ msgstr "" msgid "REAL %s - %d second response time\n" msgstr "" -#: plugins/check_real.c:319 plugins/check_smtp.c:243 plugins/check_tcp.c:459 +#: plugins/check_real.c:319 plugins/check_smtp.c:301 plugins/check_tcp.c:463 msgid "Server port must be a positive integer\n" msgstr "" -#: plugins/check_real.c:328 plugins/check_smtp.c:273 +#: plugins/check_real.c:328 plugins/check_smtp.c:345 msgid "Warning time must be a nonnegative integer\n" msgstr "" -#: plugins/check_real.c:337 plugins/check_smtp.c:264 +#: plugins/check_real.c:337 plugins/check_smtp.c:336 msgid "Critical time must be a nonnegative integer\n" msgstr "" -#: plugins/check_real.c:348 plugins/check_smtp.c:284 +#: plugins/check_real.c:348 plugins/check_smtp.c:356 msgid "Time interval must be a nonnegative integer\n" msgstr "" @@ -2903,48 +2964,55 @@ msgid "" "values." msgstr "" -#: plugins/check_smtp.c:108 +#: plugins/check_smtp.c:126 msgid "recv() failed\n" msgstr "" -#: plugins/check_smtp.c:117 +#: plugins/check_smtp.c:137 msgid "Invalid SMTP response received from host\n" msgstr "" -#: plugins/check_smtp.c:119 +#: plugins/check_smtp.c:139 #, c-format msgid "Invalid SMTP response received from host on port %d\n" msgstr "" -#: plugins/check_smtp.c:149 +#: plugins/check_smtp.c:183 plugins/check_snmp.c:512 +msgid "Could Not Compile Regular Expression" +msgstr "" + +#: plugins/check_smtp.c:192 plugins/check_smtp.c:202 #, c-format -msgid "" -"DUMMYCMD: %s\n" -"%s\n" +msgid "SMTP %s - Invalid response '%s' to command '%s'\n" msgstr "" -#: plugins/check_smtp.c:172 +#: plugins/check_smtp.c:196 plugins/check_snmp.c:278 #, c-format -msgid "SMTP %s - %.3f sec. response time, %s|time=%ldus\n" +msgid "Execute Error: %s\n" msgstr "" -#: plugins/check_smtp.c:175 +#: plugins/check_smtp.c:227 #, c-format -msgid "SMTP %s - %.3f second response time|time=%ldus\n" +msgid "SMTP %s - %.3f sec. response time%s%s|%s\n" msgstr "" -#: plugins/check_smtp.c:356 +#: plugins/check_smtp.c:315 plugins/check_smtp.c:325 plugins/check_snmp.c:568 +#, c-format +msgid "Could not realloc() units [%d]\n" +msgstr "" + +#: plugins/check_smtp.c:428 msgid "Copyright (c) 1999-2001 Ethan Galstad \n" msgstr "" -#: plugins/check_smtp.c:359 +#: plugins/check_smtp.c:431 #, fuzzy msgid "" "This plugin will attempt to open an SMTP connection with the host.\n" "\n" msgstr "Le plugin tests a %s connection with l'host specified\n" -#: plugins/check_smtp.c:370 +#: plugins/check_smtp.c:442 #, c-format msgid "" " -e, --expect=STRING\n" @@ -2952,13 +3020,14 @@ msgid "" " -n, nocommand\n" " Suppress SMTP command\n" " -C, --command=STRING\n" -" SMTP command (default: '%s')\n" +" SMTP command (may be used repeatedly)\n" +" -R, --command=STRING\n" +" Expected response to command (may be used repeatedly)\n" " -f, --from=STRING\n" " FROM-address to include in MAIL command, required by Exchange 2000\n" -" (default: '%s')\n" msgstr "" -#: plugins/check_smtp.c:387 +#: plugins/check_smtp.c:461 msgid "" "\n" "Successul connects return STATE_OK, refusals and timeouts return\n" @@ -2967,12 +3036,7 @@ msgid "" "STATE_WARNING return values.\n" msgstr "" -#: plugins/check_snmp.c:278 -#, c-format -msgid "Execute Error: %s\n" -msgstr "" - -#: plugins/check_snmp.c:285 plugins/check_snmp.c:524 +#: plugins/check_snmp.c:285 plugins/check_snmp.c:518 #, c-format msgid "%s UNKNOWN: call for regex which was not a compiled option" msgstr "" @@ -2980,7 +3044,7 @@ msgstr "" #: plugins/check_snmp.c:322 plugins/negate.c:108 #, c-format msgid "" -"%s problem - No data recieved from host\n" +"%s problem - No data received from host\n" "CMD: %s\n" msgstr "" @@ -2989,52 +3053,43 @@ msgstr "" msgid "Invalid critical threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:471 +#: plugins/check_snmp.c:468 #, c-format msgid "Invalid warning threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:518 -msgid "Could Not Compile Regular Expression" -msgstr "" - -#: plugins/check_snmp.c:544 +#: plugins/check_snmp.c:538 #, c-format msgid "Could not realloc() labels[%d]" msgstr "" -#: plugins/check_snmp.c:557 +#: plugins/check_snmp.c:550 msgid "Could not realloc() labels\n" msgstr "" -#: plugins/check_snmp.c:575 -#, c-format -msgid "Could not realloc() units [%d]\n" -msgstr "" - -#: plugins/check_snmp.c:588 +#: plugins/check_snmp.c:580 msgid "Could not realloc() units\n" msgstr "" -#: plugins/check_snmp.c:661 +#: plugins/check_snmp.c:653 #, c-format msgid "" "Missing secname (%s) or authpassword (%s) ! \n" ")" msgstr "" -#: plugins/check_snmp.c:679 +#: plugins/check_snmp.c:671 #, c-format msgid "Invalid SNMP version: %s\n" msgstr "" -#: plugins/check_snmp.c:874 +#: plugins/check_snmp.c:864 msgid "" "Check status of remote machines and obtain sustem information via SNMP\n" "\n" msgstr "" -#: plugins/check_snmp.c:884 +#: plugins/check_snmp.c:874 msgid "" " -P, --protocol=[1|3]\n" " SNMP protocol version\n" @@ -3044,7 +3099,7 @@ msgid "" " SNMPv3 auth proto\n" msgstr "" -#: plugins/check_snmp.c:893 +#: plugins/check_snmp.c:883 #, c-format msgid "" " -C, --community=STRING\n" @@ -3058,7 +3113,7 @@ msgid "" " SNMPv3 crypt passwd (DES)\n" msgstr "" -#: plugins/check_snmp.c:905 +#: plugins/check_snmp.c:895 #, c-format msgid "" " -o, --oid=OID(s)\n" @@ -3071,7 +3126,7 @@ msgid "" " to be the data that should be used in the evaluation.\n" msgstr "" -#: plugins/check_snmp.c:915 +#: plugins/check_snmp.c:905 msgid "" " -w, --warning=INTEGER_RANGE(s)\n" " Range(s) which will not result in a WARNING status\n" @@ -3079,7 +3134,7 @@ msgid "" " Range(s) which will not result in a CRITICAL status\n" msgstr "" -#: plugins/check_snmp.c:922 +#: plugins/check_snmp.c:912 msgid "" " -s, --string=STRING\n" " Return OK state (for that OID) if STRING is an exact match\n" @@ -3093,7 +3148,7 @@ msgid "" " Prefix label for output from plugin (default -s 'SNMP')\n" msgstr "" -#: plugins/check_snmp.c:933 +#: plugins/check_snmp.c:923 msgid "" " -u, --units=STRING\n" " Units label(s) for output data (e.g., 'sec.').\n" @@ -3101,7 +3156,7 @@ msgid "" " Separates output on multiple OID requests\n" msgstr "" -#: plugins/check_snmp.c:943 +#: plugins/check_snmp.c:933 msgid "" "\n" "- This plugin uses the 'snmpget' command included with the NET-SNMP " @@ -3111,14 +3166,14 @@ msgid "" " http://net-snmp.sourceforge.net before you can use this plugin.\n" msgstr "" -#: plugins/check_snmp.c:948 +#: plugins/check_snmp.c:938 msgid "" "- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " "with\n" " internal spaces must be quoted) [max 8 OIDs]\n" msgstr "" -#: plugins/check_snmp.c:952 +#: plugins/check_snmp.c:942 msgid "" "- Ranges are inclusive and are indicated with colons. When specified as\n" " 'min:max' a STATE_OK will be returned if the result is within the " @@ -3127,14 +3182,14 @@ msgid "" " returned if the result is outside the specified range.\n" msgstr "" -#: plugins/check_snmp.c:958 +#: plugins/check_snmp.c:948 msgid "" "- If specified in the order 'max:min' a non-OK state will be returned if " "the\n" " result is within the (inclusive) range.\n" msgstr "" -#: plugins/check_snmp.c:962 +#: plugins/check_snmp.c:952 msgid "" "- Upper or lower bounds may be omitted to skip checking the respective " "limit.\n" @@ -3147,7 +3202,7 @@ msgid "" " returned from the SNMP query is an unsigned integer.\n" msgstr "" -#: plugins/check_snmp.c:976 +#: plugins/check_snmp.c:966 #, c-format msgid "" "Usage: %s -H -o [-w warn_range] [-c crit_range] \n" @@ -3183,46 +3238,46 @@ msgstr "" msgid "Usage: %s [-46] [-t ] [-p ] \n" msgstr "" -#: plugins/check_swap.c:125 +#: plugins/check_swap.c:145 #, c-format msgid "Command: %s\n" msgstr "" -#: plugins/check_swap.c:127 +#: plugins/check_swap.c:147 #, c-format msgid "Format: %s\n" msgstr "" -#: plugins/check_swap.c:163 +#: plugins/check_swap.c:183 #, c-format msgid "total=%d, used=%d, free=%d\n" msgstr "" -#: plugins/check_swap.c:186 +#: plugins/check_swap.c:197 #, c-format msgid "total=%d, free=%d\n" msgstr "" -#: plugins/check_swap.c:222 +#: plugins/check_swap.c:314 #, c-format -msgid " %d%% free (%lu MB out of %lu MB)%s" +msgid " %d%% free (%llu MB out of %llu MB)" msgstr "" -#: plugins/check_swap.c:365 +#: plugins/check_swap.c:464 msgid "Warning percentage should be more than critical percentage\n" msgstr "" -#: plugins/check_swap.c:369 +#: plugins/check_swap.c:468 msgid "Warning free space should be more than critical free space\n" msgstr "" -#: plugins/check_swap.c:386 +#: plugins/check_swap.c:485 msgid "" "Check swap space on local server.\n" "\n" msgstr "" -#: plugins/check_swap.c:392 +#: plugins/check_swap.c:491 #, c-format msgid "" "\n" @@ -3230,19 +3285,19 @@ msgid "" " Exit with WARNING status if less than INTEGER bytes of swap space are " "free\n" " -w, --warning=PERCENT%%\n" -" Exit with WARNING status if less than PERCENT of swap space has been " -"used\n" +" Exit with WARNING status if less than PERCENT of swap space is free\n" " -c, --critical=INTEGER\n" " Exit with CRITICAL status if less than INTEGER bytes of swap space are " "free\n" " -c, --critical=PERCENT%%\n" -" Exit with CRITCAL status if less than PERCENT of swap space has been " -"used\n" +" Exit with CRITCAL status if less than PERCENT of swap space is free\n" " -a, --allswaps\n" " Conduct comparisons for all swap partitions, one by one\n" +" -v, --verbose\n" +" Verbose output. Up to 3 levels\n" msgstr "" -#: plugins/check_swap.c:404 +#: plugins/check_swap.c:505 msgid "" "\n" "On Solaris, if -a specified, uses swap -l, otherwise uses swap -s.\n" @@ -3250,18 +3305,18 @@ msgid "" "real memory\n" msgstr "" -#: plugins/check_swap.c:408 +#: plugins/check_swap.c:509 msgid "" "\n" "On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" msgstr "" -#: plugins/check_swap.c:420 +#: plugins/check_swap.c:521 #, c-format msgid "" "Usage:\n" -" %s [-a] -w %% -c %%\n" -" %s [-a] -w -c \n" +" %s [-av] -w %% -c %%\n" +" %s [-av] -w -c \n" " %s (-h | --help) for detailed help\n" " %s (-V | --version) for version information\n" msgstr "" @@ -3279,61 +3334,61 @@ msgstr "" msgid "%s %s%s - %.3f second response time on port %d" msgstr "" -#: plugins/check_tcp.c:426 +#: plugins/check_tcp.c:430 msgid "invalid host name or address" msgstr "" -#: plugins/check_tcp.c:431 plugins/check_time.c:252 plugins/check_time.c:264 -#: plugins/check_udp.c:166 plugins/check_users.c:145 +#: plugins/check_tcp.c:435 plugins/check_time.c:266 plugins/check_time.c:278 +#: plugins/check_udp.c:166 plugins/check_users.c:154 msgid "Critical threshold must be a nonnegative integer\n" msgstr "" -#: plugins/check_tcp.c:438 plugins/check_time.c:233 plugins/check_time.c:257 -#: plugins/check_udp.c:173 plugins/check_users.c:151 plugins/check_users.c:161 -#: plugins/check_users.c:168 +#: plugins/check_tcp.c:442 plugins/check_time.c:247 plugins/check_time.c:271 +#: plugins/check_udp.c:173 plugins/check_users.c:160 plugins/check_users.c:170 +#: plugins/check_users.c:177 msgid "Warning threshold must be a nonnegative integer\n" msgstr "" -#: plugins/check_tcp.c:453 +#: plugins/check_tcp.c:457 msgid "Timeout interval must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:476 +#: plugins/check_tcp.c:480 msgid "Maxbytes must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:490 +#: plugins/check_tcp.c:494 msgid "Refuse mut be one of ok, warn, crit\n" msgstr "" -#: plugins/check_tcp.c:496 +#: plugins/check_tcp.c:500 msgid "Delay must be a positive integer\n" msgstr "" -#: plugins/check_tcp.c:501 +#: plugins/check_tcp.c:505 msgid "SSL support not available. Install OpenSSL and recompile." msgstr "" -#: plugins/check_tcp.c:509 +#: plugins/check_tcp.c:513 msgid "You must provide a server address\n" msgstr "" -#: plugins/check_tcp.c:527 +#: plugins/check_tcp.c:531 msgid "ERROR: Cannot create SSL context.\n" msgstr "" -#: plugins/check_tcp.c:553 +#: plugins/check_tcp.c:557 msgid "ERROR: Cannot initiate SSL handshake.\n" msgstr "" -#: plugins/check_tcp.c:599 +#: plugins/check_tcp.c:603 #, fuzzy, c-format msgid "" "This plugin tests %s connections with the specified host.\n" "\n" msgstr "Le plugin tests a %s connection with l'host specified\n" -#: plugins/check_tcp.c:610 +#: plugins/check_tcp.c:614 msgid "" " -s, --send=STRING\n" " String to send to the server\n" @@ -3349,7 +3404,7 @@ msgstr "" " -q, --quit=STRING\n" " String to send server to initiate a clean close of the connection\n" -#: plugins/check_tcp.c:618 +#: plugins/check_tcp.c:622 #, fuzzy msgid "" " -r, --refuse=ok|warn|crit\n" @@ -3370,7 +3425,7 @@ msgstr "" " -c, --critical=DOUBLE\n" " Response time to result in critical status (seconds)\n" -#: plugins/check_tcp.c:641 +#: plugins/check_tcp.c:645 #, fuzzy, c-format msgid "" "Usage: %s -H host -p port [-w ] [-c ]\n" @@ -3382,68 +3437,68 @@ msgstr "" "\t[-e expect_string] [-q quit_string] [-m maxbytes] [-d delay]\n" "\t[-t to_sec] [-r refuse_state] [-v] [-4|-6]\n" -#: plugins/check_time.c:87 +#: plugins/check_time.c:88 #, c-format msgid "TIME UNKNOWN - could not connect to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:100 +#: plugins/check_time.c:101 #, c-format msgid "TIME UNKNOWN - could not send UDP request to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:124 +#: plugins/check_time.c:125 #, c-format msgid "TIME UNKNOWN - no data on recv() from server %s, port %d\n" msgstr "" -#: plugins/check_time.c:136 +#: plugins/check_time.c:138 #, c-format -msgid "TIME %s - %d second response time\n" +msgid "TIME %s - %d second response time|%s\n" msgstr "" -#: plugins/check_time.c:150 +#: plugins/check_time.c:156 #, c-format -msgid "TIME %s - %lu second time difference\n" +msgid "TIME %s - %lu second time difference|%s %s\n" msgstr "" -#: plugins/check_time.c:215 plugins/check_time.c:290 plugins/check_udp.c:161 +#: plugins/check_time.c:229 plugins/check_time.c:304 plugins/check_udp.c:161 #: plugins/check_udp.c:202 msgid "Invalid host name/address\n" msgstr "" -#: plugins/check_time.c:229 +#: plugins/check_time.c:243 msgid "Warning thresholds must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:248 +#: plugins/check_time.c:262 msgid "Critical thresholds must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:271 plugins/check_udp.c:186 +#: plugins/check_time.c:285 plugins/check_udp.c:186 msgid "Server port must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:277 plugins/check_udp.c:180 +#: plugins/check_time.c:291 plugins/check_udp.c:180 msgid "Timeout interval must be a nonnegative integer\n" msgstr "" -#: plugins/check_time.c:294 plugins/check_udp.c:207 +#: plugins/check_time.c:308 plugins/check_udp.c:207 msgid "Host name was not supplied\n" msgstr "" -#: plugins/check_time.c:314 plugins/check_udp.c:225 plugins/check_users.c:186 +#: plugins/check_time.c:328 plugins/check_udp.c:225 plugins/check_users.c:195 msgid "Copyright (c) 1999 Ethan Galstad\n" msgstr "" -#: plugins/check_time.c:317 +#: plugins/check_time.c:331 #, fuzzy msgid "" "This plugin will check the time on the specified host.\n" "\n" msgstr "Le plugin tests a %s connection with l'host specified\n" -#: plugins/check_time.c:326 +#: plugins/check_time.c:340 msgid "" " -u, --udp\n" " Use UDP to connect, not TCP\n" @@ -3457,7 +3512,7 @@ msgid "" " Response time (sec.) necessary to result in critical status\n" msgstr "" -#: plugins/check_time.c:349 +#: plugins/check_time.c:363 #, c-format msgid "" "Usage: %s -H [-p port] [-u] [-w variance] [-c variance]\n" @@ -3514,11 +3569,11 @@ msgid "" " [-e expect] [-s send] [-t to_sec] [-v]\n" msgstr "" -#: plugins/check_ups.c:546 +#: plugins/check_ups.c:573 msgid "Copyright (c) 2000 Tom Shields" msgstr "" -#: plugins/check_ups.c:549 +#: plugins/check_ups.c:576 msgid "" "This plugin tests the UPS service on the specified host.\n" "Network UPS Tools from www.exploits.org must be running for this plugin to\n" @@ -3526,13 +3581,13 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:559 +#: plugins/check_ups.c:586 msgid "" " -u, --ups=STRING\n" " Name of UPS\n" msgstr "" -#: plugins/check_ups.c:569 +#: plugins/check_ups.c:596 msgid "" "This plugin attempts to determine the status of a UPS (Uninterruptible " "Power\n" @@ -3545,7 +3600,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:576 +#: plugins/check_ups.c:603 msgid "" "You may also specify a variable to check [such as temperature, utility " "voltage,\n" @@ -3557,7 +3612,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:582 +#: plugins/check_ups.c:609 msgid "" "Notes:\n" "\n" @@ -3568,31 +3623,31 @@ msgid "" "\n" msgstr "" -#: plugins/check_ups.c:597 +#: plugins/check_ups.c:624 #, c-format msgid "" "Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n" " [-t timeout] [-v]\n" msgstr "" -#: plugins/check_users.c:73 +#: plugins/check_users.c:76 #, c-format msgid "# users=%d" msgstr "" -#: plugins/check_users.c:98 +#: plugins/check_users.c:106 #, c-format -msgid "USERS %s - %d users currently logged in\n" +msgid "USERS %s - %d users currently logged in |%s\n" msgstr "" -#: plugins/check_users.c:189 +#: plugins/check_users.c:198 msgid "" "This plugin checks the number of users currently logged in on the local\n" "system and generates an error if the number exceeds the thresholds " "specified.\n" msgstr "" -#: plugins/check_users.c:197 +#: plugins/check_users.c:206 msgid "" " -w, --warning=INTEGER\n" " Set WARNING status if more than INTEGER users are logged in\n" @@ -3637,7 +3692,7 @@ msgstr "" #: plugins/urlize.c:105 #, c-format msgid "" -"%s problem - No data recieved from host\n" +"%s problem - No data received from host\n" "CMD: %s\n" msgstr "" -- cgit v0.10-9-g596f