diff options
author | Mark Salyzyn <salyzyn@google.com> | 2016-09-28 10:07:20 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2016-09-30 12:47:05 -0700 |
commit | 66ce3e08c5632a20ea66bde6dd76397041edf034 (patch) | |
tree | e77589e0f6c62e8ac1c8faabe2d9dd2934d3ecee /libsysutils | |
parent | 0dd4431072cce3c62876b728cb20aa5b77b11a8d (diff) | |
download | core-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.gz core-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.bz2 core-66ce3e08c5632a20ea66bde6dd76397041edf034.zip |
system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example
to all others. Adjust header order to comply with Android Coding
standards.
Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
Diffstat (limited to 'libsysutils')
-rw-r--r-- | libsysutils/src/FrameworkClient.cpp | 24 | ||||
-rw-r--r-- | libsysutils/src/FrameworkCommand.cpp | 4 | ||||
-rw-r--r-- | libsysutils/src/FrameworkListener.cpp | 10 | ||||
-rw-r--r-- | libsysutils/src/NetlinkEvent.cpp | 31 | ||||
-rw-r--r-- | libsysutils/src/NetlinkListener.cpp | 15 | ||||
-rw-r--r-- | libsysutils/src/ServiceManager.cpp | 24 | ||||
-rw-r--r-- | libsysutils/src/SocketClient.cpp | 24 | ||||
-rw-r--r-- | libsysutils/src/SocketListener.cpp | 11 |
8 files changed, 95 insertions, 48 deletions
diff --git a/libsysutils/src/FrameworkClient.cpp b/libsysutils/src/FrameworkClient.cpp index 2f3705535..72b3d0a36 100644 --- a/libsysutils/src/FrameworkClient.cpp +++ b/libsysutils/src/FrameworkClient.cpp @@ -1,11 +1,27 @@ +/* + * Copyright (C) 2009-2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "FrameworkClient" + #include <alloca.h> #include <errno.h> -#include <sys/types.h> #include <pthread.h> +#include <sys/types.h> -#define LOG_TAG "FrameworkClient" -#include <cutils/log.h> - +#include <android/log.h> #include <sysutils/FrameworkClient.h> FrameworkClient::FrameworkClient(int socket) { diff --git a/libsysutils/src/FrameworkCommand.cpp b/libsysutils/src/FrameworkCommand.cpp index 0b95a8104..dccacda4e 100644 --- a/libsysutils/src/FrameworkCommand.cpp +++ b/libsysutils/src/FrameworkCommand.cpp @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <errno.h> #define LOG_TAG "FrameworkCommand" -#include <cutils/log.h> +#include <errno.h> +#include <android/log.h> #include <sysutils/FrameworkCommand.h> #define UNUSED __attribute__((unused)) diff --git a/libsysutils/src/FrameworkListener.cpp b/libsysutils/src/FrameworkListener.cpp index e7b3dd69a..b96174a9c 100644 --- a/libsysutils/src/FrameworkListener.cpp +++ b/libsysutils/src/FrameworkListener.cpp @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <errno.h> -#include <string.h> -#include <stdlib.h> #define LOG_TAG "FrameworkListener" -#include <cutils/log.h> +#include <errno.h> +#include <stdlib.h> +#include <string.h> -#include <sysutils/FrameworkListener.h> +#include <android/log.h> #include <sysutils/FrameworkCommand.h> +#include <sysutils/FrameworkListener.h> #include <sysutils/SocketClient.h> static const int CMD_BUF_SIZE = 1024; diff --git a/libsysutils/src/NetlinkEvent.cpp b/libsysutils/src/NetlinkEvent.cpp index 739fad7d0..b78769254 100644 --- a/libsysutils/src/NetlinkEvent.cpp +++ b/libsysutils/src/NetlinkEvent.cpp @@ -13,39 +13,36 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <stdlib.h> -#include <string.h> #define LOG_TAG "NetlinkEvent" -#include <cutils/log.h> - -#include <sysutils/NetlinkEvent.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netinet/icmp6.h> #include <arpa/inet.h> -#include <net/if.h> - #include <linux/if.h> #include <linux/if_addr.h> #include <linux/if_link.h> #include <linux/netfilter/nfnetlink.h> #include <linux/netfilter/nfnetlink_log.h> #include <linux/netfilter_ipv4/ipt_ULOG.h> - -/* From kernel's net/netfilter/xt_quota2.c */ -const int LOCAL_QLOG_NL_EVENT = 112; -const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET; - #include <linux/netlink.h> #include <linux/rtnetlink.h> - +#include <net/if.h> +#include <netinet/in.h> +#include <netinet/icmp6.h> #include <netlink/attr.h> #include <netlink/genl/genl.h> #include <netlink/handlers.h> #include <netlink/msg.h> +#include <stdlib.h> +#include <string.h> +#include <sys/socket.h> +#include <sys/types.h> + +/* From kernel's net/netfilter/xt_quota2.c */ +const int LOCAL_QLOG_NL_EVENT = 112; +const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET; + +#include <android/log.h> +#include <sysutils/NetlinkEvent.h> NetlinkEvent::NetlinkEvent() { mAction = Action::kUnknown; diff --git a/libsysutils/src/NetlinkListener.cpp b/libsysutils/src/NetlinkListener.cpp index 637aa1ea3..1c4c7df6d 100644 --- a/libsysutils/src/NetlinkListener.cpp +++ b/libsysutils/src/NetlinkListener.cpp @@ -13,17 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <errno.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <linux/netlink.h> +#define LOG_TAG "NetlinkListener" + +#include <errno.h> #include <string.h> +#include <sys/socket.h> +#include <sys/types.h> -#define LOG_TAG "NetlinkListener" -#include <cutils/log.h> -#include <cutils/uevent.h> +#include <linux/netlink.h> /* out of order because must follow sys/socket.h */ +#include <android/log.h> +#include <cutils/uevent.h> #include <sysutils/NetlinkEvent.h> #if 1 diff --git a/libsysutils/src/ServiceManager.cpp b/libsysutils/src/ServiceManager.cpp index 41ac1dd31..1abe988a8 100644 --- a/libsysutils/src/ServiceManager.cpp +++ b/libsysutils/src/ServiceManager.cpp @@ -1,11 +1,27 @@ +/* + * Copyright (C) 2009-2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "Service" + #include <errno.h> #include <string.h> -#include <sysutils/ServiceManager.h> - -#define LOG_TAG "Service" -#include <cutils/log.h> +#include <android/log.h> #include <cutils/properties.h> +#include <sysutils/ServiceManager.h> ServiceManager::ServiceManager() { } diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp index bb9b6a164..02505d304 100644 --- a/libsysutils/src/SocketClient.cpp +++ b/libsysutils/src/SocketClient.cpp @@ -1,16 +1,32 @@ +/* + * Copyright (C) 2009-2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "SocketClient" + #include <alloca.h> +#include <arpa/inet.h> #include <errno.h> #include <malloc.h> #include <pthread.h> #include <signal.h> #include <string.h> -#include <arpa/inet.h> #include <sys/socket.h> #include <sys/types.h> -#define LOG_TAG "SocketClient" -#include <cutils/log.h> - +#include <android/log.h> #include <sysutils/SocketClient.h> SocketClient::SocketClient(int socket, bool owned) { diff --git a/libsysutils/src/SocketListener.cpp b/libsysutils/src/SocketListener.cpp index 608abaea5..6a676a954 100644 --- a/libsysutils/src/SocketListener.cpp +++ b/libsysutils/src/SocketListener.cpp @@ -13,19 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <stdio.h> + +#define LOG_TAG "SocketListener" + #include <errno.h> +#include <stdio.h> #include <stdlib.h> -#include <sys/socket.h> #include <sys/select.h> +#include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> #include <sys/un.h> -#define LOG_TAG "SocketListener" -#include <cutils/log.h> +#include <android/log.h> #include <cutils/sockets.h> - #include <sysutils/SocketListener.h> #include <sysutils/SocketClient.h> |