----- "Scott Emery" <emery@xxxxxxx> wrote:
> From 1d48e2c6181cc9e4a0b9003c0092a29eaafb4999 Mon Sep 17 00:00:00
> 2001
> From: root <root@xxxxxxxxxxxxxxxxx>
> Date: Fri, 2 Jul 2010 15:17:48 -0700
> Subject: [PATCH 3/5] lustrecomm - error handling should use the
> __pmNotify API for consistent and
> timestamped messages
>
> ---
> src/pmdas/lustrecomm/file_indexed.c | 2 +-
> src/pmdas/lustrecomm/file_single.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/pmdas/lustrecomm/file_indexed.c
> b/src/pmdas/lustrecomm/file_indexed.c
> index b326335..ecfe053 100644
> --- a/src/pmdas/lustrecomm/file_indexed.c
> +++ b/src/pmdas/lustrecomm/file_indexed.c
> @@ -107,7 +107,7 @@ int file_indexed (struct file_state *f_s, int
> type, int *base, void **vpp, int i
> break;
> case PM_TYPE_NOSUPPORT:
> default:
> - fprintf(stderr,"file_indexed: type %d not supported\n", type);
> + __pmNotifyErr(LOG_ERR,"file_indexed: type %d not supported\n",
> type);
> break;
> }
> /* so, write it up and slice and dice */
> diff --git a/src/pmdas/lustrecomm/file_single.c
> b/src/pmdas/lustrecomm/file_single.c
> index 224dfe7..6c2a567 100644
> --- a/src/pmdas/lustrecomm/file_single.c
> +++ b/src/pmdas/lustrecomm/file_single.c
> @@ -130,7 +130,7 @@ int file_single (char *filename, int type, int
> *base, void **vpp)
> break;
> case PM_TYPE_NOSUPPORT:
> default:
> - fprintf(stderr,"file_single: type %d not supported\n", type);
> + __pmNotifyErr(stderr,"file_single: type %d not supported\n", type);
> break;
> }
> return 0;
This last bit looks incorrect BTW Scott - first argument to __pmNotifyErr is
a log level not a file descriptor (LOG_ERR would be appropriate here I guess).
cheers.
--
Nathan
|