diff --git a/init/action.cpp b/init/action.cpp index 2ccf0bc53..347edb054 100644 --- a/init/action.cpp +++ b/init/action.cpp @@ -16,16 +16,11 @@ #include "action.h" -#include - +#include #include #include #include -#include "builtins.h" -#include "error.h" -#include "init_parser.h" -#include "log.h" #include "util.h" using android::base::Join; diff --git a/init/bootchart.cpp b/init/bootchart.cpp index beabea144..825603a9a 100644 --- a/init/bootchart.cpp +++ b/init/bootchart.cpp @@ -17,7 +17,6 @@ #include "bootchart.h" #include -#include #include #include #include @@ -31,9 +30,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/init/builtins.cpp b/init/builtins.cpp index 64c00e954..e0a98f50a 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -19,33 +19,27 @@ #include #include #include +#include +#include #include #include -#include #include +#include #include #include #include -#include #include #include +#include +#include #include #include #include -#include #include #include -#include -#include - -#include -#include - -#include -#include -#include #include +#include #include #include #include @@ -55,14 +49,14 @@ #include #include #include -#include +#include +#include +#include #include "action.h" #include "bootchart.h" -#include "devices.h" #include "init.h" #include "init_parser.h" -#include "log.h" #include "property_service.h" #include "reboot.h" #include "service.h" diff --git a/init/descriptors.cpp b/init/descriptors.cpp index 6e457cdc0..bc6bc8dca 100644 --- a/init/descriptors.cpp +++ b/init/descriptors.cpp @@ -19,16 +19,15 @@ #include #include #include -#include #include +#include #include #include #include #include #include "init.h" -#include "log.h" #include "util.h" DescriptorInfo::DescriptorInfo(const std::string& name, const std::string& type, uid_t uid, diff --git a/init/devices.cpp b/init/devices.cpp index 405f92e17..4dc646844 100644 --- a/init/devices.cpp +++ b/init/devices.cpp @@ -19,41 +19,37 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include - #include #include -#include -#include -#include -#include - -#include - #include +#include #include #include #include #include +#include +#include +#include +#include +#include #include "devices.h" #include "ueventd_parser.h" #include "util.h" -#include "log.h" #define SYSFS_PREFIX "/sys" static const char *firmware_dirs[] = { "/etc/firmware", diff --git a/init/devices.h b/init/devices.h index 26a064bac..83f0eeffb 100644 --- a/init/devices.h +++ b/init/devices.h @@ -17,9 +17,10 @@ #ifndef _INIT_DEVICES_H #define _INIT_DEVICES_H -#include #include +#include + enum coldboot_action_t { // coldboot continues without creating the device for the uevent COLDBOOT_CONTINUE = 0, diff --git a/init/import_parser.cpp b/init/import_parser.cpp index d52247b3e..8a2bcc291 100644 --- a/init/import_parser.cpp +++ b/init/import_parser.cpp @@ -16,12 +16,8 @@ #include "import_parser.h" -#include "errno.h" +#include -#include -#include - -#include "log.h" #include "util.h" bool ImportParser::ParseSection(const std::vector& args, diff --git a/init/init.cpp b/init/init.cpp index e14034f6f..2737b2b6d 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#include "init.h" + #include #include #include @@ -42,6 +44,7 @@ #include #include +#include #include #include #include @@ -59,7 +62,6 @@ #include "devices.h" #include "fs_mgr.h" #include "import_parser.h" -#include "init.h" #include "init_parser.h" #include "keychords.h" #include "log.h" diff --git a/init/init_parser.cpp b/init/init_parser.cpp index a192862df..53e670bd7 100644 --- a/init/init_parser.cpp +++ b/init/init_parser.cpp @@ -14,18 +14,17 @@ * limitations under the License. */ +#include "init_parser.h" + #include -#include #include +#include +#include + #include "action.h" -#include "init_parser.h" -#include "log.h" #include "parser.h" #include "service.h" -#include "util.h" - -#include Parser::Parser() { } diff --git a/init/init_parser.h b/init/init_parser.h index f66ba524b..6935fdf75 100644 --- a/init/init_parser.h +++ b/init/init_parser.h @@ -18,6 +18,7 @@ #define _INIT_INIT_PARSER_H_ #include +#include #include #include diff --git a/init/init_parser_test.cpp b/init/init_parser_test.cpp index 52aaa37fe..d8fd2bab9 100644 --- a/init/init_parser_test.cpp +++ b/init/init_parser_test.cpp @@ -18,9 +18,7 @@ #include "init.h" #include "service.h" -#include "util.h" -#include #include #include diff --git a/init/keychords.cpp b/init/keychords.cpp index 5801ea88f..c572cee2b 100644 --- a/init/keychords.cpp +++ b/init/keychords.cpp @@ -14,19 +14,17 @@ * limitations under the License. */ -#include #include #include -#include #include #include #include #include +#include #include #include "init.h" -#include "log.h" #include "service.h" static struct input_keychord *keychords = 0; diff --git a/init/log.cpp b/init/log.cpp index 6b32526df..ee6489b9a 100644 --- a/init/log.cpp +++ b/init/log.cpp @@ -17,9 +17,10 @@ #include "log.h" #include +#include #include -#include +#include #include #include diff --git a/init/log.h b/init/log.h index 8fa6d74f4..29a27afdb 100644 --- a/init/log.h +++ b/init/log.h @@ -17,7 +17,7 @@ #ifndef _INIT_LOG_H_ #define _INIT_LOG_H_ -#include +#include void InitKernelLogging(char* argv[]); diff --git a/init/parser.cpp b/init/parser.cpp index 45862b732..5953a8867 100644 --- a/init/parser.cpp +++ b/init/parser.cpp @@ -4,7 +4,7 @@ #include #include -#include "log.h" +#include void parse_error(struct parse_state *state, const char *fmt, ...) { diff --git a/init/property_service.cpp b/init/property_service.cpp index a4d8b5fd1..985722312 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -14,46 +14,44 @@ * limitations under the License. */ +#include "property_service.h" + +#include +#include +#include +#include #include +#include +#include +#include #include #include -#include #include -#include -#include -#include -#include -#include -#include +#include #include - -#include -#include +#include +#include +#include +#include #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ #include -#include -#include -#include -#include -#include -#include +#include +#include -#include -#include -#include - -#include #include +#include #include #include -#include "bootimg.h" +#include +#include +#include +#include +#include -#include "property_service.h" #include "init.h" #include "util.h" -#include "log.h" using android::base::StringPrintf; diff --git a/init/property_service.h b/init/property_service.h index 994da63da..585cd0f22 100644 --- a/init/property_service.h +++ b/init/property_service.h @@ -20,6 +20,7 @@ #include #include #include + #include struct property_audit_data { diff --git a/init/reboot.cpp b/init/reboot.cpp index 62e5c85f0..53bdeb158 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#include "reboot.h" + #include #include #include @@ -27,11 +30,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -41,11 +44,8 @@ #include #include -#include "log.h" #include "property_service.h" -#include "reboot.h" #include "service.h" -#include "util.h" using android::base::StringPrintf; diff --git a/init/reboot.h b/init/reboot.h index 395624922..6432fa5df 100644 --- a/init/reboot.h +++ b/init/reboot.h @@ -17,6 +17,8 @@ #ifndef _INIT_REBOOT_H #define _INIT_REBOOT_H +#include + /* Reboot / shutdown the system. * cmd ANDROID_RB_* as defined in android_reboot.h * reason Reason string like "reboot", "userrequested" diff --git a/init/service.cpp b/init/service.cpp index e89de9af6..8cb8dc1ec 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -25,27 +25,21 @@ #include #include #include -#include #include #include #include -#include - -#include #include +#include #include #include #include #include +#include +#include #include -#include - -#include "action.h" #include "init.h" -#include "init_parser.h" -#include "log.h" #include "property_service.h" #include "util.h" diff --git a/init/service.h b/init/service.h index d84ce0281..5e89b9f15 100644 --- a/init/service.h +++ b/init/service.h @@ -19,14 +19,13 @@ #include -#include - #include #include #include #include #include +#include #include "action.h" #include "capabilities.h" diff --git a/init/signal_handler.cpp b/init/signal_handler.cpp index 5e3acac09..4d56d8472 100644 --- a/init/signal_handler.cpp +++ b/init/signal_handler.cpp @@ -14,22 +14,17 @@ * limitations under the License. */ -#include -#include #include -#include +#include #include #include -#include #include +#include #include -#include "action.h" #include "init.h" -#include "log.h" #include "service.h" -#include "util.h" static int signal_write_fd = -1; static int signal_read_fd = -1; diff --git a/init/ueventd.cpp b/init/ueventd.cpp index ba53e4737..ea767a850 100644 --- a/init/ueventd.cpp +++ b/init/ueventd.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#include "ueventd.h" + #include #include #include @@ -24,17 +26,15 @@ #include #include -#include - +#include #include #include #include -#include "ueventd.h" -#include "log.h" -#include "util.h" #include "devices.h" +#include "log.h" #include "ueventd_parser.h" +#include "util.h" int ueventd_main(int argc, char **argv) { diff --git a/init/ueventd.h b/init/ueventd.h index d12d7fe11..d44d1ca55 100644 --- a/init/ueventd.h +++ b/init/ueventd.h @@ -17,9 +17,10 @@ #ifndef _INIT_UEVENTD_H_ #define _INIT_UEVENTD_H_ -#include #include +#include + enum devname_src_t { DEVNAME_UNKNOWN = 0, DEVNAME_UEVENT_DEVNAME, diff --git a/init/ueventd_parser.cpp b/init/ueventd_parser.cpp index 554c1e35d..510d7bbd6 100644 --- a/init/ueventd_parser.cpp +++ b/init/ueventd_parser.cpp @@ -14,18 +14,18 @@ * limitations under the License. */ +#include "ueventd_parser.h" + #include -#include -#include -#include #include +#include #include #include +#include + +#include -#include "ueventd.h" -#include "ueventd_parser.h" #include "parser.h" -#include "log.h" #include "util.h" static list_declare(subsystem_list); diff --git a/init/util.cpp b/init/util.cpp index bf4109c9e..b33e3ff8d 100644 --- a/init/util.cpp +++ b/init/util.cpp @@ -14,26 +14,21 @@ * limitations under the License. */ +#include "util.h" + #include #include #include -#include #include #include -#include #include +#include #include +#include +#include #include #include -#include -#include - -#include -#include -#include -#include - #include #include @@ -42,15 +37,13 @@ #include #include #include - #include -/* for ANDROID_SOCKET_* */ #include +#include +#include #include "init.h" -#include "log.h" #include "reboot.h" -#include "util.h" using android::base::boot_clock; diff --git a/init/watchdogd.cpp b/init/watchdogd.cpp index b196147d4..21c1e5b43 100644 --- a/init/watchdogd.cpp +++ b/init/watchdogd.cpp @@ -16,11 +16,12 @@ #include #include +#include #include #include #include -#include +#include #include "log.h" #include "util.h"