Remove android_common.h
This header file was used for all imports of android.c and android_platform.c. Move the include directives to the source files instead, to follow the include-what-you-use rule. Bug: 234313751 Test: m Change-Id: I362a722b2a3e7cd204772d8e37fa9b893184e1ce
This commit is contained in:
parent
5f3411ec65
commit
12b4861e66
5 changed files with 47 additions and 42 deletions
|
@ -1,4 +1,14 @@
|
||||||
#include "android_common.h"
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <log/log.h>
|
||||||
|
#include <selinux/android.h>
|
||||||
|
#include <selinux/label.h>
|
||||||
|
|
||||||
|
#include "android_internal.h"
|
||||||
|
#include "callbacks.h"
|
||||||
|
|
||||||
#ifdef __ANDROID_VNDK__
|
#ifdef __ANDROID_VNDK__
|
||||||
#ifndef LOG_EVENT_STRING
|
#ifndef LOG_EVENT_STRING
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <grp.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/mount.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <selinux/selinux.h>
|
|
||||||
#include <selinux/context.h>
|
|
||||||
#include <selinux/android.h>
|
|
||||||
#include <selinux/label.h>
|
|
||||||
#include <log/log.h>
|
|
||||||
#include "policy.h"
|
|
||||||
#include "callbacks.h"
|
|
||||||
#include "selinux_internal.h"
|
|
||||||
#include "label_internal.h"
|
|
||||||
#include <fnmatch.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <sys/vfs.h>
|
|
||||||
#include <linux/magic.h>
|
|
||||||
#include <libgen.h>
|
|
||||||
|
|
||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
|
||||||
|
|
||||||
#define FC_DIGEST_SIZE SHA_DIGEST_LENGTH
|
|
||||||
|
|
||||||
// Context files (file_contexts, service_contexts, etc) may be spread over
|
|
||||||
// multiple partitions: system, apex, system_ext, product, vendor and/or odm.
|
|
||||||
#define MAX_CONTEXT_PATHS 6
|
|
||||||
// The maximum number of alternatives for a file on one partition.
|
|
||||||
#define MAX_ALT_CONTEXT_PATHS 2
|
|
|
@ -1,11 +1,18 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "android_common.h"
|
#include <selinux/selinux.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Context files (file_contexts, service_contexts, etc) may be spread over
|
||||||
|
// multiple partitions: system, apex, system_ext, product, vendor and/or odm.
|
||||||
|
#define MAX_CONTEXT_PATHS 6
|
||||||
|
// The maximum number of alternatives for a file on one partition.
|
||||||
|
#define MAX_ALT_CONTEXT_PATHS 2
|
||||||
|
|
||||||
/* Within each set of files, adds the first file that is accessible to `paths`.
|
/* Within each set of files, adds the first file that is accessible to `paths`.
|
||||||
* Returns the number of accessible files. */
|
* Returns the number of accessible files. */
|
||||||
|
|
|
@ -1,11 +1,37 @@
|
||||||
#include "android_internal.h"
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <fnmatch.h>
|
||||||
#include <fts.h>
|
#include <fts.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
#include <sys/xattr.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <log/log.h>
|
||||||
#include <packagelistparser/packagelistparser.h>
|
#include <packagelistparser/packagelistparser.h>
|
||||||
#include <private/android_filesystem_config.h>
|
#include <private/android_filesystem_config.h>
|
||||||
|
#include <selinux/android.h>
|
||||||
|
#include <selinux/context.h>
|
||||||
|
#include <selinux/selinux.h>
|
||||||
|
|
||||||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||||
#include <sys/_system_properties.h>
|
#include <sys/_system_properties.h>
|
||||||
|
|
||||||
|
#include "android_internal.h"
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "label_internal.h"
|
||||||
|
#include "selinux_internal.h"
|
||||||
|
|
||||||
/* Locations for the file_contexts files. For each partition, only the first
|
/* Locations for the file_contexts files. For each partition, only the first
|
||||||
* existing entry will be used (for example, if
|
* existing entry will be used (for example, if
|
||||||
* /system/etc/selinux/plat_file_contexts exists, /plat_file_contexts will be
|
* /system/etc/selinux/plat_file_contexts exists, /plat_file_contexts will be
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <android-base/stringprintf.h>
|
#include <android-base/stringprintf.h>
|
||||||
|
|
||||||
#include "android_internal.h"
|
#include "android_internal.h"
|
||||||
|
#include "label_internal.h"
|
||||||
|
|
||||||
using android::base::StringPrintf;
|
using android::base::StringPrintf;
|
||||||
using android::base::WriteStringToFile;
|
using android::base::WriteStringToFile;
|
||||||
|
|
Loading…
Reference in a new issue