From c5e283784700858f582ce32818cd7034739146ab Mon Sep 17 00:00:00 2001
From: Adam Wujek <adam.wujek@cern.ch>
Date: Wed, 25 Feb 2015 15:54:56 +0100
Subject: [PATCH] userspace/snmpd: remove functions wrs_fpopen and wrs_fpclose

Functions wrs_fpopen and wrs_fpclose are not needed anymore.

Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
---
 userspace/snmpd/init.c    | 18 ------------------
 userspace/snmpd/wrsSnmp.h |  4 ----
 2 files changed, 22 deletions(-)

diff --git a/userspace/snmpd/init.c b/userspace/snmpd/init.c
index 46cc274dc..89fc97f94 100644
--- a/userspace/snmpd/init.c
+++ b/userspace/snmpd/init.c
@@ -18,21 +18,3 @@ void init_wrsSnmp(void)
 	init_wrsVersion();
 	init_wrsDate();
 }
-
-/* open a file or a pipe, so I test with files, and run with pipes */
-FILE *wrs_fpopen(char *file_or_pipe, char *mode)
-{
-	if (file_or_pipe[0] == '|')
-		return popen(file_or_pipe + 1, mode);
-	else
-		return fopen(file_or_pipe, mode);
-}
-
-void wrs_fpclose(FILE *f, char *file_or_pipe)
-{
-	if (file_or_pipe[0] == '|')
-		pclose(f);
-	else
-		fclose(f);
-}
-
diff --git a/userspace/snmpd/wrsSnmp.h b/userspace/snmpd/wrsSnmp.h
index ec8227975..d313c11e2 100644
--- a/userspace/snmpd/wrsSnmp.h
+++ b/userspace/snmpd/wrsSnmp.h
@@ -85,8 +85,4 @@ extern void init_wrsDate(void);
 
 #define WRS_OID 1, 3, 6, 1, 4, 1, 96, 100
 
-/* Open a file or a pipe according to name[0] (e.g. "|wr_mon", "/tmp/log") */
-extern FILE *wrs_fpopen(char *file_or_pipe, char *mode);
-extern void wrs_fpclose(FILE *f, char *file_or_pipe);
-
 #endif /* WRS_SNMP_H */
-- 
GitLab