summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2012-04-10 08:25:50 +0200
committerMichal Minar <miminar@redhat.com>2012-04-10 08:25:50 +0200
commit0616c415dfa12f435eca3edb0d9301d5491bbe7d (patch)
tree50c9f71a5883ea76ef4f5dcf349240d08481a3ca
parentb8a540fa2ef42d2540c70c61c48db5c137e67c2b (diff)
downloadopenlmi-providers-0616c415dfa12f435eca3edb0d9301d5491bbe7d.tar.gz
openlmi-providers-0616c415dfa12f435eca3edb0d9301d5491bbe7d.tar.xz
openlmi-providers-0616c415dfa12f435eca3edb0d9301d5491bbe7d.zip
removed logging module
-rw-r--r--Linux_Fan.c3
-rw-r--r--Linux_FanUtil.c19
-rw-r--r--Linux_FanUtil.h24
-rw-r--r--Makefile2
-rw-r--r--cmpiLinux_FanCommon.c1
-rw-r--r--cmpiLinux_FanProvider.c2
-rw-r--r--cmpiLinux_FanSensor.c1
-rw-r--r--cmpiLinux_FanSensorProvider.c2
8 files changed, 1 insertions, 53 deletions
diff --git a/Linux_Fan.c b/Linux_Fan.c
index e79f891..738920b 100644
--- a/Linux_Fan.c
+++ b/Linux_Fan.c
@@ -28,7 +28,6 @@
#include <sensors/error.h>
#include "Linux_Fan.h"
-#include "Linux_FanUtil.h"
#define MAX_CHIP_NAME_LENGTH 200
@@ -177,7 +176,6 @@ static unsigned int _load_accessible_features(
unsigned int i = 1;
int sf_type;
- log_msg("_load_accessible_features enter");
while(i <= CIM_FAN_AF_FEATURE_MAX) {
switch (i) {
case CIM_FAN_AF_MIN_SPEED:
@@ -213,7 +211,6 @@ static unsigned int _load_accessible_features(
}
i = i << 1;
}
- log_msg("_load_accessible_features exit");
return res;
}
diff --git a/Linux_FanUtil.c b/Linux_FanUtil.c
deleted file mode 100644
index f8b57f1..0000000
--- a/Linux_FanUtil.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-#include "Linux_FanUtil.h"
-
-static FILE *of = NULL;
-
-void log_msg(char const *msg) {
- if (!of) {
- if (!(of = fopen("/tmp/Linux_FanProvider.log", "a"))) return;
- }
- fprintf(of, "%s\n", msg);
- fflush(of);
-}
-
-void util_cleanup() {
- if (of) {
- fclose(of);
- of = NULL;
- }
-}
diff --git a/Linux_FanUtil.h b/Linux_FanUtil.h
deleted file mode 100644
index 787b109..0000000
--- a/Linux_FanUtil.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This file is part of cmpiLinux_FanProvider.
- *
- * cmpiLinux_FanProvider 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 3 of the License, or
- * (at your option) any later version.
- *
- * cmpiLinux_FanProvider 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 cmpiLinux_FanProvider. If not, see
- * <http://www.gnu.org/licenses/>.
- */
-#ifndef LINUX_FANUTIL_H_
-#define LINUX_FANUTIL_H_
-
-void log_msg(char const *msg);
-void util_cleanup();
-
-#endif /* ----- LINUX_FANUTIL_H_ ----- */
-
diff --git a/Makefile b/Makefile
index 0ea6fbb..bff56c1 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ libcmpiLinux_FanAssociatedSensorProvider.so: \
$(CC) -shared -Wl -o $@ $^ -lcmpiOSBase_Common
libcmpi%Provider.so: cmpi%Provider.o cmpi%.o \
- cmpiLinux_FanCommon.o Linux_Fan.o Linux_FanUtil.o
+ cmpiLinux_FanCommon.o Linux_Fan.o
$(CC) -shared -Wl -o $@ $^ -lcmpiOSBase_Common -lsensors
%.o: %.c
diff --git a/cmpiLinux_FanCommon.c b/cmpiLinux_FanCommon.c
index 9a81227..1cb512b 100644
--- a/cmpiLinux_FanCommon.c
+++ b/cmpiLinux_FanCommon.c
@@ -23,7 +23,6 @@
#include <sblim/cmpiOSBase_Common.h>
#include "cmpiLinux_FanCommon.h"
-#include "Linux_FanUtil.h"
#define UNUSED(x) ((void) (x))
diff --git a/cmpiLinux_FanProvider.c b/cmpiLinux_FanProvider.c
index 41792bf..b19a0d7 100644
--- a/cmpiLinux_FanProvider.c
+++ b/cmpiLinux_FanProvider.c
@@ -31,7 +31,6 @@
#include <sblim/cmpiOSBase_Common.h>
#include "cmpiLinux_Fan.h"
-#include "Linux_FanUtil.h"
#define UNUSED(x) ((void) (x))
static const CMPIBroker * _broker;
@@ -50,7 +49,6 @@ CMPIStatus Linux_FanProviderCleanup( CMPIInstanceMI * mi,
_OSBASE_TRACE(1,("--- %s CMPI Cleanup() called",_ClassName));
cleanup_linux_fan_module();
- util_cleanup();
_OSBASE_TRACE(1,("--- %s CMPI Cleanup() exited",_ClassName));
CMReturn(CMPI_RC_OK);
}
diff --git a/cmpiLinux_FanSensor.c b/cmpiLinux_FanSensor.c
index 636eacb..bbe8b22 100644
--- a/cmpiLinux_FanSensor.c
+++ b/cmpiLinux_FanSensor.c
@@ -23,7 +23,6 @@
#include <sblim/cmpiOSBase_Common.h>
#include "cmpiLinux_FanSensor.h"
-#include "Linux_FanUtil.h"
static CMPIArray * _get_PossibleStates(
CMPIBroker const *_broker,
diff --git a/cmpiLinux_FanSensorProvider.c b/cmpiLinux_FanSensorProvider.c
index 1f78558..e3e1092 100644
--- a/cmpiLinux_FanSensorProvider.c
+++ b/cmpiLinux_FanSensorProvider.c
@@ -31,7 +31,6 @@
#include <sblim/cmpiOSBase_Common.h>
#include "cmpiLinux_FanSensor.h"
-#include "Linux_FanUtil.h"
#define UNUSED(x) ((void) (x))
static const CMPIBroker * _broker;
@@ -54,7 +53,6 @@ CMPIStatus Linux_FanSensorProviderCleanup(
_OSBASE_TRACE(1,("--- %s CMPI Cleanup() called",_ClassName));
cleanup_linux_fan_module();
- util_cleanup();
_OSBASE_TRACE(1,("--- %s CMPI Cleanup() exited",_ClassName));
CMReturn(CMPI_RC_OK);
}