summaryrefslogtreecommitdiffstats
path: root/libsysutils
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-09-30 22:12:55 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-30 22:12:55 +0000
commit16f77860326dbcc9a34e0b7e3eab3ca8a2027e76 (patch)
tree0f417f50301198522f842d42e361442158e4f6a6 /libsysutils
parenta8d0a469566d462dad94e78c3f7582489b0568ac (diff)
parenteb189f147b701315bfacf7fdc4338b9153964ed1 (diff)
downloadsystem_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.tar.gz
system_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.tar.bz2
system_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.zip
system/core Replace cutils/log.h with android/log.h am: 66ce3e08c5
am: eb189f147b Change-Id: I3f2b13e259d9bbb7bc714f21eab7181fa72c35bf
Diffstat (limited to 'libsysutils')
-rw-r--r--libsysutils/src/FrameworkClient.cpp24
-rw-r--r--libsysutils/src/FrameworkCommand.cpp4
-rw-r--r--libsysutils/src/FrameworkListener.cpp10
-rw-r--r--libsysutils/src/NetlinkEvent.cpp31
-rw-r--r--libsysutils/src/NetlinkListener.cpp15
-rw-r--r--libsysutils/src/ServiceManager.cpp24
-rw-r--r--libsysutils/src/SocketClient.cpp24
-rw-r--r--libsysutils/src/SocketListener.cpp11
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 579ead991..b1fb849ff 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>