diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-16 11:11:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-16 11:11:51 +0000 |
| commit | 6066d41889ada93c5312e081d5bdff94fc1fd2af (patch) | |
| tree | 2e6faf54c6782b6355feca6b43faab1633c91b43 /server/TetherController.cpp | |
| parent | e37344992f49c8e0e6e9b816f590afbd00a961ca (diff) | |
| parent | 4a0ab5ff4a87cfc4a987da99546b01e44875a2e5 (diff) | |
Merge "Revert "Update for libbase.""
Diffstat (limited to 'server/TetherController.cpp')
| -rw-r--r-- | server/TetherController.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/server/TetherController.cpp b/server/TetherController.cpp index 44c7e35a..c9a93fd6 100644 --- a/server/TetherController.cpp +++ b/server/TetherController.cpp @@ -27,19 +27,16 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include <base/file.h> #define LOG_TAG "TetherController" #include <cutils/log.h> #include <cutils/properties.h> +#include <utils/file.h> #include "Fwmark.h" #include "NetdConstants.h" #include "Permission.h" #include "TetherController.h" -using android::base::ReadFileToString; -using android::base::WriteStringToFile; - TetherController::TetherController() { mInterfaces = new InterfaceCollection(); mDnsNetId = 0; @@ -70,7 +67,7 @@ int TetherController::setIpFwdEnabled(bool enable) { return 0; } - if (!WriteStringToFile(enable ? "1" : "0", "/proc/sys/net/ipv4/ip_forward")) { + if (!android::WriteStringToFile(enable ? "1" : "0", "/proc/sys/net/ipv4/ip_forward")) { ALOGE("Failed to write ip_forward (%s)", strerror(errno)); return -1; } @@ -80,7 +77,7 @@ int TetherController::setIpFwdEnabled(bool enable) { bool TetherController::getIpFwdEnabled() { std::string enabled; - if (!ReadFileToString("/proc/sys/net/ipv4/ip_forward", &enabled)) { + if (!android::ReadFileToString("/proc/sys/net/ipv4/ip_forward", &enabled)) { ALOGE("Failed to read ip_forward (%s)", strerror(errno)); return -1; } |
