From: Steve Block Date: Tue, 20 Dec 2011 16:22:42 +0000 (+0000) Subject: Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE X-Git-Tag: android-x86-7.1-r1~474 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7b984e3f7e724f8a3547a707210319f3d479f261;p=android-x86%2Fsystem-netd.git Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I85b946663d5a0e7606140282bf758c27b8c6f68f --- diff --git a/CommandListener.cpp b/CommandListener.cpp index 99e1269..1f99333 100644 --- a/CommandListener.cpp +++ b/CommandListener.cpp @@ -310,7 +310,7 @@ int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); return 0; } - LOGD("Setting iface cfg"); + ALOGD("Setting iface cfg"); struct in_addr addr; unsigned flags = 0; @@ -338,7 +338,7 @@ int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, for (int i = 5; i < argc; i++) { char *flag = argv[i]; if (!strcmp(flag, "up")) { - LOGD("Trying to bring up %s", argv[2]); + ALOGD("Trying to bring up %s", argv[2]); if (ifc_up(argv[2])) { LOGE("Error upping interface"); cli->sendMsg(ResponseCode::OperationFailed, "Failed to up interface", true); @@ -346,7 +346,7 @@ int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, return 0; } } else if (!strcmp(flag, "down")) { - LOGD("Trying to bring down %s", argv[2]); + ALOGD("Trying to bring down %s", argv[2]); if (ifc_down(argv[2])) { LOGE("Error downing interface"); cli->sendMsg(ResponseCode::OperationFailed, "Failed to down interface", true); @@ -375,7 +375,7 @@ int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, return 0; } else if (!strcmp(argv[1], "clearaddrs")) { // arglist: iface - LOGD("Clearing all IP addresses on %s", argv[2]); + ALOGD("Clearing all IP addresses on %s", argv[2]); ifc_clear_addresses(argv[2]); diff --git a/DnsProxyListener.cpp b/DnsProxyListener.cpp index bcb961e..9db7896 100644 --- a/DnsProxyListener.cpp +++ b/DnsProxyListener.cpp @@ -68,7 +68,7 @@ static bool sendLenAndData(SocketClient *c, const int len, const void* data) { void DnsProxyListener::GetAddrInfoHandler::run() { if (DBG) { - LOGD("GetAddrInfoHandler, now for %s / %s", mHost, mService); + ALOGD("GetAddrInfoHandler, now for %s / %s", mHost, mService); } struct addrinfo* result = NULL; @@ -103,7 +103,7 @@ int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient *cli, int argc, char **argv) { if (DBG) { for (int i = 0; i < argc; i++) { - LOGD("argv[%i]=%s", i, argv[i]); + ALOGD("argv[%i]=%s", i, argv[i]); } } if (argc != 7) { @@ -141,7 +141,7 @@ int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient *cli, } if (DBG) { - LOGD("GetAddrInfoHandler for %s / %s", + ALOGD("GetAddrInfoHandler for %s / %s", name ? name : "[nullhost]", service ? service : "[nullservice]"); } @@ -165,7 +165,7 @@ int DnsProxyListener::GetHostByAddrCmd::runCommand(SocketClient *cli, int argc, char **argv) { if (DBG) { for (int i = 0; i < argc; i++) { - LOGD("argv[%i]=%s", i, argv[i]); + ALOGD("argv[%i]=%s", i, argv[i]); } } if (argc != 4) { @@ -215,7 +215,7 @@ void* DnsProxyListener::GetHostByAddrHandler::threadStart(void* obj) { void DnsProxyListener::GetHostByAddrHandler::run() { if (DBG) { - LOGD("DnsProxyListener::GetHostByAddrHandler::run\n"); + ALOGD("DnsProxyListener::GetHostByAddrHandler::run\n"); } struct hostent* hp; @@ -224,7 +224,7 @@ void DnsProxyListener::GetHostByAddrHandler::run() { hp = gethostbyaddr((char*)mAddress, mAddressLen, mAddressFamily); if (DBG) { - LOGD("GetHostByAddrHandler::run gethostbyaddr errno: %s hp->h_name = %s, name_len = %d\n", + ALOGD("GetHostByAddrHandler::run gethostbyaddr errno: %s hp->h_name = %s, name_len = %d\n", hp ? "success" : strerror(errno), (hp && hp->h_name) ? hp->h_name: "null", (hp && hp->h_name) ? strlen(hp->h_name)+ 1 : 0); diff --git a/PanController.cpp b/PanController.cpp index 253c943..c58aebb 100644 --- a/PanController.cpp +++ b/PanController.cpp @@ -93,11 +93,11 @@ int PanController::stopPan() { return 0; } - LOGD("Stopping PAN services"); + ALOGD("Stopping PAN services"); kill(mPid, SIGTERM); waitpid(mPid, NULL, 0); mPid = 0; - LOGD("PAN services stopped"); + ALOGD("PAN services stopped"); return 0; } diff --git a/PppController.cpp b/PppController.cpp index 4caf382..b50b2b7 100644 --- a/PppController.cpp +++ b/PppController.cpp @@ -111,11 +111,11 @@ int PppController::detachPppd(const char *tty) { return 0; } - LOGD("Stopping PPPD services on port %s", tty); + ALOGD("Stopping PPPD services on port %s", tty); kill(mPid, SIGTERM); waitpid(mPid, NULL, 0); mPid = 0; - LOGD("PPPD services on port %s stopped", tty); + ALOGD("PPPD services on port %s stopped", tty); return 0; } diff --git a/ResolverController.cpp b/ResolverController.cpp index b079f81..3e3cc0d 100644 --- a/ResolverController.cpp +++ b/ResolverController.cpp @@ -26,7 +26,7 @@ int ResolverController::setDefaultInterface(const char* iface) { if (DBG) { - LOGD("setDefaultInterface iface = %s\n", iface); + ALOGD("setDefaultInterface iface = %s\n", iface); } _resolv_set_default_iface(iface); @@ -36,7 +36,7 @@ int ResolverController::setDefaultInterface(const char* iface) { int ResolverController::setInterfaceDnsServers(const char* iface, char** servers, int numservers) { if (DBG) { - LOGD("setInterfaceDnsServers iface = %s\n", iface); + ALOGD("setInterfaceDnsServers iface = %s\n", iface); } _resolv_set_nameservers_for_iface(iface, servers, numservers); @@ -46,7 +46,7 @@ int ResolverController::setInterfaceDnsServers(const char* iface, char** servers int ResolverController::setInterfaceAddress(const char* iface, struct in_addr* addr) { if (DBG) { - LOGD("setInterfaceAddress iface = %s\n", iface); + ALOGD("setInterfaceAddress iface = %s\n", iface); } _resolv_set_addr_of_iface(iface, addr); @@ -56,7 +56,7 @@ int ResolverController::setInterfaceAddress(const char* iface, struct in_addr* a int ResolverController::flushDefaultDnsCache() { if (DBG) { - LOGD("flushDefaultDnsCache\n"); + ALOGD("flushDefaultDnsCache\n"); } _resolv_flush_cache_for_default_iface(); @@ -66,7 +66,7 @@ int ResolverController::flushDefaultDnsCache() { int ResolverController::flushInterfaceDnsCache(const char* iface) { if (DBG) { - LOGD("flushInterfaceDnsCache iface = %s\n", iface); + ALOGD("flushInterfaceDnsCache iface = %s\n", iface); } _resolv_flush_cache_for_iface(iface); diff --git a/SoftapController.cpp b/SoftapController.cpp index cd61462..dd75a3a 100644 --- a/SoftapController.cpp +++ b/SoftapController.cpp @@ -123,7 +123,7 @@ int SoftapController::startDriver(char *iface) { return -1; } if (!iface || (iface[0] == '\0')) { - LOGD("Softap driver start - wrong interface"); + ALOGD("Softap driver start - wrong interface"); iface = mIface; } @@ -139,7 +139,7 @@ int SoftapController::startDriver(char *iface) { ifc_close(); #endif usleep(AP_DRIVER_START_DELAY); - LOGD("Softap driver start: %d", ret); + ALOGD("Softap driver start: %d", ret); return ret; } @@ -151,7 +151,7 @@ int SoftapController::stopDriver(char *iface) { return -1; } if (!iface || (iface[0] == '\0')) { - LOGD("Softap driver stop - wrong interface"); + ALOGD("Softap driver stop - wrong interface"); iface = mIface; } *mBuf = 0; @@ -164,7 +164,7 @@ int SoftapController::stopDriver(char *iface) { } #endif ret = setCommand(iface, "STOP"); - LOGD("Softap driver stop: %d", ret); + ALOGD("Softap driver stop: %d", ret); return ret; } @@ -205,7 +205,7 @@ int SoftapController::startSoftap() { } else { mPid = pid; - LOGD("Softap startap - Ok"); + ALOGD("Softap startap - Ok"); usleep(AP_BSS_START_DELAY); } } @@ -222,7 +222,7 @@ int SoftapController::stopSoftap() { } #ifdef HAVE_HOSTAPD - LOGD("Stopping Softap service"); + ALOGD("Stopping Softap service"); kill(mPid, SIGTERM); waitpid(mPid, NULL, 0); #endif @@ -233,7 +233,7 @@ int SoftapController::stopSoftap() { *mBuf = 0; ret = setCommand(mIface, "AP_BSS_STOP"); mPid = 0; - LOGD("Softap service stopped: %d", ret); + ALOGD("Softap service stopped: %d", ret); usleep(AP_BSS_STOP_DELAY); return ret; } @@ -386,7 +386,7 @@ int SoftapController::setSoftap(int argc, char *argv[]) { LOGE("Softap set - failed: %d", ret); } else { - LOGD("Softap set - Ok"); + ALOGD("Softap set - Ok"); usleep(AP_SET_CFG_DELAY); } #endif @@ -448,7 +448,7 @@ int SoftapController::fwReloadSoftap(int argc, char *argv[]) LOGE("Softap fwReload - failed: %d", ret); } else { - LOGD("Softap fwReload - Ok"); + ALOGD("Softap fwReload - Ok"); } return ret; } @@ -467,7 +467,7 @@ int SoftapController::clientsSoftap(char **retbuf) LOGE("Softap clients - failed: %d", ret); } else { asprintf(retbuf, "Softap clients:%s", mBuf); - LOGD("Softap clients:%s", mBuf); + ALOGD("Softap clients:%s", mBuf); } return ret; } diff --git a/TetherController.cpp b/TetherController.cpp index 2059cce..e065e81 100644 --- a/TetherController.cpp +++ b/TetherController.cpp @@ -53,7 +53,7 @@ TetherController::~TetherController() { int TetherController::setIpFwdEnabled(bool enable) { - LOGD("Setting IP forward enable = %d", enable); + ALOGD("Setting IP forward enable = %d", enable); // In BP tools mode, do not disable IP forwarding char bootmode[PROPERTY_VALUE_MAX] = {0}; @@ -103,7 +103,7 @@ int TetherController::startTethering(int num_addrs, struct in_addr* addrs) { return -1; } - LOGD("Starting tethering services"); + ALOGD("Starting tethering services"); pid_t pid; int pipefd[2]; @@ -159,7 +159,7 @@ int TetherController::startTethering(int num_addrs, struct in_addr* addrs) { close(pipefd[0]); mDaemonPid = pid; mDaemonFd = pipefd[1]; - LOGD("Tethering services running"); + ALOGD("Tethering services running"); } return 0; @@ -172,14 +172,14 @@ int TetherController::stopTethering() { return 0; } - LOGD("Stopping tethering services"); + ALOGD("Stopping tethering services"); kill(mDaemonPid, SIGTERM); waitpid(mDaemonPid, NULL, 0); mDaemonPid = 0; close(mDaemonFd); mDaemonFd = -1; - LOGD("Tethering services stopped"); + ALOGD("Tethering services stopped"); return 0; } @@ -198,7 +198,7 @@ int TetherController::setDnsForwarders(char **servers, int numServers) { mDnsForwarders->clear(); for (i = 0; i < numServers; i++) { - LOGD("setDnsForwarders(%d = '%s')", i, servers[i]); + ALOGD("setDnsForwarders(%d = '%s')", i, servers[i]); struct in_addr a; @@ -210,7 +210,7 @@ int TetherController::setDnsForwarders(char **servers, int numServers) { cmdLen += strlen(servers[i]); if (cmdLen + 2 >= MAX_CMD_SIZE) { - LOGD("Too many DNS servers listed"); + ALOGD("Too many DNS servers listed"); break; } @@ -220,7 +220,7 @@ int TetherController::setDnsForwarders(char **servers, int numServers) { } if (mDaemonFd != -1) { - LOGD("Sending update msg to dnsmasq [%s]", daemonCmd); + ALOGD("Sending update msg to dnsmasq [%s]", daemonCmd); if (write(mDaemonFd, daemonCmd, strlen(daemonCmd) +1) < 0) { LOGE("Failed to send update command to dnsmasq (%s)", strerror(errno)); mDnsForwarders->clear(); diff --git a/main.cpp b/main.cpp index 36712a4..c27ade6 100644 --- a/main.cpp +++ b/main.cpp @@ -134,5 +134,5 @@ static void coldboot(const char *path) static void sigchld_handler(int sig) { pid_t pid = wait(NULL); - LOGD("Child process %d exited", pid); + ALOGD("Child process %d exited", pid); }