diff --git a/src/system/proc_tools.cpp b/src/system/proc_tools.cpp index 5d863b80b..a4c06296e 100644 --- a/src/system/proc_tools.cpp +++ b/src/system/proc_tools.cpp @@ -10,8 +10,9 @@ #include #include #include -#include /* isspace */ -#include /* sscanf */ +#include /* isspace */ +#include /* sscanf */ +#include #include "proc_tools.h" @@ -28,6 +29,11 @@ int proc_put(const char *path, const char *value, const int len) return ret; } +int proc_put(const char *path, const char *value) +{ + return proc_put(path, value, strlen(value)); +} + int proc_put(const char *path, bool state) { return proc_put(path, state ? "1" : "0", 1); diff --git a/src/system/proc_tools.h b/src/system/proc_tools.h index 720fe1790..187516423 100644 --- a/src/system/proc_tools.h +++ b/src/system/proc_tools.h @@ -9,6 +9,7 @@ #ifndef __PROC_TOOLS_H__ #define __PROC_TOOLS_H__ int proc_put(const char *path, const char *value, const int len); +int proc_put(const char *path, const char *value); int proc_put(const char *path, bool state); int proc_get(const char *path, char *value, const int len); unsigned int proc_get_hex(const char *path);