From 9f28f6102a27ad0c0fa75e776ac19091de514722 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 10 Jul 2006 20:56:27 +0200 Subject: [PATCH] vserver plugin: Use `plugin_complain' and `plugin_relief'. --- src/vserver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vserver.c b/src/vserver.c index 694b6d02..3a77961b 100644 --- a/src/vserver.c +++ b/src/vserver.c @@ -343,11 +343,17 @@ static void vserver_read (void) DIR *proc; struct dirent *dent; /* 42 */ + static complain_t complain_obj; + errno = 0; - if (NULL == (proc = opendir (PROCDIR))) { - syslog (LOG_ERR, "Cannot open '%s': %s", PROCDIR, strerror (errno)); + if (NULL == (proc = opendir (PROCDIR))) + { + plugin_complain (LOG_ERR, &complain_obj, "vserver plugin: " + "fopen (%s) failed: %s", PROCDIR, strerror (errno)); return; } + plugin_relief (LOG_NOTICE, &complain_obj, "vserver plugin: " + "fopen (%s) succeeded.", PROCDIR); while (NULL != (dent = readdir (proc))) { int len; -- 2.11.0