From 6ad4d0a601485475645ddd1b23181a4c31754977 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Wed, 4 Mar 2020 13:35:28 -0800 Subject: [PATCH] Remove EXCLUDE_FS_CONFIG_STRUCTURES Long overdue clean up; there is no reason to include fs_config.h in android_filesystem_config.h, and the fact that it causes problems if it's done, necessitating EXCLUDE_FS_CONFIG_STRUCTURES to exist, is a good reason to fix it. Bug: 149785767 Test: build Change-Id: I5ba2541cd1045c22486140649c90db39163081fd --- cpio/mkbootfs.c | 1 + init/host_init_verifier.cpp | 4 +--- libcutils/include/private/android_filesystem_config.h | 11 +---------- libcutils/include/private/canned_fs_config.h | 6 ++---- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/cpio/mkbootfs.c b/cpio/mkbootfs.c index e52762e9b..58153f3f5 100644 --- a/cpio/mkbootfs.c +++ b/cpio/mkbootfs.c @@ -13,6 +13,7 @@ #include #include +#include /* NOTES ** diff --git a/init/host_init_verifier.cpp b/init/host_init_verifier.cpp index 0bd4df463..ef9a4514c 100644 --- a/init/host_init_verifier.cpp +++ b/init/host_init_verifier.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -48,9 +49,6 @@ #include "service_list.h" #include "service_parser.h" -#define EXCLUDE_FS_CONFIG_STRUCTURES -#include "generated_android_ids.h" - using namespace std::literals; using android::base::ParseInt; diff --git a/libcutils/include/private/android_filesystem_config.h b/libcutils/include/private/android_filesystem_config.h index b73a29b22..e4f45a85e 100644 --- a/libcutils/include/private/android_filesystem_config.h +++ b/libcutils/include/private/android_filesystem_config.h @@ -34,14 +34,7 @@ * partition, from which the system reads passwd and group files. */ -#ifndef _ANDROID_FILESYSTEM_CONFIG_H_ -#define _ANDROID_FILESYSTEM_CONFIG_H_ - -#include - -#if !defined(__ANDROID_VNDK__) && !defined(EXCLUDE_FS_CONFIG_STRUCTURES) -#include -#endif +#pragma once /* This is the master Users and Groups config for the platform. * DO NOT EVER RENUMBER @@ -224,5 +217,3 @@ * documented at the top of this header file. * Also see build/tools/fs_config for more details. */ - -#endif diff --git a/libcutils/include/private/canned_fs_config.h b/libcutils/include/private/canned_fs_config.h index 135b91c6c..ad4de4ce6 100644 --- a/libcutils/include/private/canned_fs_config.h +++ b/libcutils/include/private/canned_fs_config.h @@ -14,10 +14,10 @@ * limitations under the License. */ -#ifndef _CANNED_FS_CONFIG_H -#define _CANNED_FS_CONFIG_H +#pragma once #include +#include __BEGIN_DECLS @@ -26,5 +26,3 @@ void canned_fs_config(const char* path, int dir, const char* target_out_path, un unsigned* gid, unsigned* mode, uint64_t* capabilities); __END_DECLS - -#endif