mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
proc_tools: c => cpp; add new helper member to write bool values
Origin commit data
------------------
Branch: ni/coolstream
Commit: 40044905db
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-13 (Mon, 13 Nov 2017)
Origin message was:
------------------
- proc_tools: c => cpp; add new helper member to write bool values
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -37,7 +37,7 @@ libneutrino_system_a_SOURCES = \
|
|||||||
localize.cpp \
|
localize.cpp \
|
||||||
helpers.cpp \
|
helpers.cpp \
|
||||||
ping.cpp \
|
ping.cpp \
|
||||||
proc_tools.c \
|
proc_tools.cpp \
|
||||||
settings.cpp \
|
settings.cpp \
|
||||||
stacktrace.cpp \
|
stacktrace.cpp \
|
||||||
sysload.cpp \
|
sysload.cpp \
|
||||||
|
@@ -28,6 +28,11 @@ int proc_put(const char *path, const char *value, const int len)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int proc_put(const char *path, bool state)
|
||||||
|
{
|
||||||
|
return proc_put(path, state ? "1" : "0", 1);
|
||||||
|
}
|
||||||
|
|
||||||
int proc_get(const char *path, char *value, const int len)
|
int proc_get(const char *path, char *value, const int len)
|
||||||
{
|
{
|
||||||
int ret, ret2;
|
int ret, ret2;
|
@@ -8,13 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef __PROC_TOOLS_H__
|
#ifndef __PROC_TOOLS_H__
|
||||||
#define __PROC_TOOLS_H__
|
#define __PROC_TOOLS_H__
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
int proc_put(const char *path, const char *value, const int len);
|
int proc_put(const char *path, const char *value, const int len);
|
||||||
|
int proc_put(const char *path, bool state);
|
||||||
int proc_get(const char *path, char *value, const int len);
|
int proc_get(const char *path, char *value, const int len);
|
||||||
unsigned int proc_get_hex(const char *path);
|
unsigned int proc_get_hex(const char *path);
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user