Commit c5e28378 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: remove functions wrs_fpopen and wrs_fpclose

Functions wrs_fpopen and wrs_fpclose are not needed anymore.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 665fbe09
......@@ -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);
}
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment