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/InterfaceController.cpp | |
| parent | e37344992f49c8e0e6e9b816f590afbd00a961ca (diff) | |
| parent | 4a0ab5ff4a87cfc4a987da99546b01e44875a2e5 (diff) | |
Merge "Revert "Update for libbase.""
Diffstat (limited to 'server/InterfaceController.cpp')
| -rw-r--r-- | server/InterfaceController.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/server/InterfaceController.cpp b/server/InterfaceController.cpp index 76f5e05d..6855bdf7 100644 --- a/server/InterfaceController.cpp +++ b/server/InterfaceController.cpp @@ -19,18 +19,14 @@ #include <malloc.h> #define LOG_TAG "InterfaceController" -#include <base/file.h> -#include <base/stringprintf.h> #include <cutils/log.h> #include <logwrap/logwrap.h> +#include <utils/file.h> +#include <utils/stringprintf.h> #include "InterfaceController.h" #include "RouteController.h" -using android::base::ReadFileToString; -using android::base::StringPrintf; -using android::base::WriteStringToFile; - const char ipv6_proc_path[] = "/proc/sys/net/ipv6/conf"; const char sys_net_path[] = "/sys/class/net"; @@ -59,8 +55,8 @@ int InterfaceController::writeIPv6ProcPath(const char *interface, const char *se errno = ENOENT; return -1; } - std::string path(StringPrintf("%s/%s/%s", ipv6_proc_path, interface, setting)); - return WriteStringToFile(value, path); + std::string path(android::StringPrintf("%s/%s/%s", ipv6_proc_path, interface, setting)); + return android::WriteStringToFile(value, path); } int InterfaceController::setEnableIPv6(const char *interface, const int on) { @@ -137,7 +133,7 @@ void InterfaceController::setAcceptRA(const char *value) { // ID to get the table. If it's set to -1000, routes from interface ID 5 will go into // table 1005, etc. void InterfaceController::setAcceptRARouteTable(int tableOrOffset) { - std::string value(StringPrintf("%d", tableOrOffset)); + std::string value(android::StringPrintf("%d", tableOrOffset)); setOnAllInterfaces("accept_ra_rt_table", value.c_str()); } @@ -147,8 +143,8 @@ int InterfaceController::setMtu(const char *interface, const char *mtu) errno = ENOENT; return -1; } - std::string path(StringPrintf("%s/%s/mtu", sys_net_path, interface)); - return WriteStringToFile(mtu, path); + std::string path(android::StringPrintf("%s/%s/mtu", sys_net_path, interface)); + return android::WriteStringToFile(mtu, path); } void InterfaceController::setIPv6OptimisticMode(const char *value) { |
