diff options
| author | Elliott Hughes <enh@google.com> | 2015-02-02 18:08:59 -0800 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2015-02-03 14:11:06 -0800 |
| commit | d161406141619f84d94b2ecee618569cbbabcb30 (patch) | |
| tree | c7069216a8649aec197e9236514102ab8eb44e59 /server/InterfaceController.cpp | |
| parent | 6c08cd6aa7aee66b973ee4861237ad36560e0239 (diff) | |
Switch netd over to <utils/file.h>.
Change-Id: Id79961cc4feee1c307dad06d64e3f4ffe060c4da
Diffstat (limited to 'server/InterfaceController.cpp')
| -rw-r--r-- | server/InterfaceController.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/InterfaceController.cpp b/server/InterfaceController.cpp index f0b313f0..64b8453a 100644 --- a/server/InterfaceController.cpp +++ b/server/InterfaceController.cpp @@ -20,6 +20,7 @@ #define LOG_TAG "InterfaceController" #include <cutils/log.h> +#include <utils/file.h> #include "InterfaceController.h" #include "RouteController.h" @@ -49,7 +50,7 @@ int InterfaceController::writeIPv6ProcPath(const char *interface, const char *se return -1; } asprintf(&path, "%s/%s/%s", ipv6_proc_path, interface, setting); - int success = writeFile(path, value, strlen(value)); + bool success = android::WriteStringToFile(value, path); free(path); return success; } @@ -119,7 +120,7 @@ int InterfaceController::setMtu(const char *interface, const char *mtu) return -1; } asprintf(&path, "%s/%s/mtu", sys_net_path, interface); - int success = writeFile(path, mtu, strlen(mtu)); + bool success = android::WriteStringToFile(mtu, path); free(path); return success; } |
