Loading include/private/fs_config.h 0 → 100644 +4 −0 Original line number Diff line number Diff line // TODO(b/63135587) remove this file after the transitive dependency // from private/android_filesystem_config.h is resolved. All files that use // libcutils/include/private/fs_config.h should include the file directly, not // indirectly via private/android_filesystem_config.h. libcutils/canned_fs_config.c +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <string.h> #include <private/android_filesystem_config.h> #include <private/fs_config.h> #include <private/canned_fs_config.h> typedef struct { Loading libcutils/include/cutils/android_filesystem_config.h 0 → 120000 +1 −0 Original line number Diff line number Diff line ../private/android_filesystem_config.h No newline at end of file libcutils/include/private/android_filesystem_config.h +2 −45 Original line number Diff line number Diff line Loading @@ -14,11 +14,6 @@ * limitations under the License. */ /* This file is used to define the properties of the filesystem ** images generated by build tools (mkbootfs and mkyaffs2image) and ** by the device side of adb. */ /* * This file is consumed by build/tools/fs_config and is used * for generating various files. Anything #define AID_<name> Loading Loading @@ -49,18 +44,12 @@ #ifndef _ANDROID_FILESYSTEM_CONFIG_H_ #define _ANDROID_FILESYSTEM_CONFIG_H_ #include <stdint.h> #include <sys/cdefs.h> #include <sys/types.h> #if defined(__BIONIC__) #include <linux/capability.h> #else #include "android_filesystem_capability.h" #if !defined(__ANDROID_VNDK__) && !defined(EXCLUDE_FS_CONFIG_STRUCTURES) #include <private/fs_config.h> #endif #define CAP_MASK_LONG(cap_name) (1ULL << (cap_name)) /* This is the master Users and Groups config for the platform. * DO NOT EVER RENUMBER */ Loading Loading @@ -193,36 +182,4 @@ * Also see build/tools/fs_config for more details. */ #if !defined(EXCLUDE_FS_CONFIG_STRUCTURES) struct fs_path_config { unsigned mode; unsigned uid; unsigned gid; uint64_t capabilities; const char* prefix; }; /* Rules for directories and files has moved to system/code/libcutils/fs_config.c */ __BEGIN_DECLS /* * Used in: * build/tools/fs_config/fs_config.c * build/tools/fs_get_stats/fs_get_stats.c * system/extras/ext4_utils/make_ext4fs_main.c * external/squashfs-tools/squashfs-tools/android.c * system/core/cpio/mkbootfs.c * system/core/adb/file_sync_service.cpp * system/extras/ext4_utils/canned_fs_config.c */ void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities); ssize_t fs_config_generate(char* buffer, size_t length, const struct fs_path_config* pc); __END_DECLS #endif #endif libcutils/include/private/fs_config.h +43 −0 Original line number Diff line number Diff line Loading @@ -14,10 +14,24 @@ * limitations under the License. */ /* This file is used to define the properties of the filesystem ** images generated by build tools (mkbootfs and mkyaffs2image) and ** by the device side of adb. */ #ifndef _LIBS_CUTILS_PRIVATE_FS_CONFIG_H #define _LIBS_CUTILS_PRIVATE_FS_CONFIG_H #include <stdint.h> #include <sys/cdefs.h> #if defined(__BIONIC__) #include <linux/capability.h> #else // defined(__BIONIC__) #include "android_filesystem_capability.h" #endif // defined(__BIONIC__) #define CAP_MASK_LONG(cap_name) (1ULL << (cap_name)) /* * binary format for the runtime <partition>/etc/fs_config_(dirs|files) Loading @@ -34,4 +48,33 @@ struct fs_path_config_from_file { char prefix[]; } __attribute__((__aligned__(sizeof(uint64_t)))); struct fs_path_config { unsigned mode; unsigned uid; unsigned gid; uint64_t capabilities; const char* prefix; }; /* Rules for directories and files has moved to system/code/libcutils/fs_config.c */ __BEGIN_DECLS /* * Used in: * build/tools/fs_config/fs_config.c * build/tools/fs_get_stats/fs_get_stats.c * system/extras/ext4_utils/make_ext4fs_main.c * external/squashfs-tools/squashfs-tools/android.c * system/core/cpio/mkbootfs.c * system/core/adb/file_sync_service.cpp * system/extras/ext4_utils/canned_fs_config.c */ void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities); ssize_t fs_config_generate(char* buffer, size_t length, const struct fs_path_config* pc); __END_DECLS #endif /* _LIBS_CUTILS_PRIVATE_FS_CONFIG_H */ Loading
include/private/fs_config.h 0 → 100644 +4 −0 Original line number Diff line number Diff line // TODO(b/63135587) remove this file after the transitive dependency // from private/android_filesystem_config.h is resolved. All files that use // libcutils/include/private/fs_config.h should include the file directly, not // indirectly via private/android_filesystem_config.h.
libcutils/canned_fs_config.c +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <string.h> #include <private/android_filesystem_config.h> #include <private/fs_config.h> #include <private/canned_fs_config.h> typedef struct { Loading
libcutils/include/cutils/android_filesystem_config.h 0 → 120000 +1 −0 Original line number Diff line number Diff line ../private/android_filesystem_config.h No newline at end of file
libcutils/include/private/android_filesystem_config.h +2 −45 Original line number Diff line number Diff line Loading @@ -14,11 +14,6 @@ * limitations under the License. */ /* This file is used to define the properties of the filesystem ** images generated by build tools (mkbootfs and mkyaffs2image) and ** by the device side of adb. */ /* * This file is consumed by build/tools/fs_config and is used * for generating various files. Anything #define AID_<name> Loading Loading @@ -49,18 +44,12 @@ #ifndef _ANDROID_FILESYSTEM_CONFIG_H_ #define _ANDROID_FILESYSTEM_CONFIG_H_ #include <stdint.h> #include <sys/cdefs.h> #include <sys/types.h> #if defined(__BIONIC__) #include <linux/capability.h> #else #include "android_filesystem_capability.h" #if !defined(__ANDROID_VNDK__) && !defined(EXCLUDE_FS_CONFIG_STRUCTURES) #include <private/fs_config.h> #endif #define CAP_MASK_LONG(cap_name) (1ULL << (cap_name)) /* This is the master Users and Groups config for the platform. * DO NOT EVER RENUMBER */ Loading Loading @@ -193,36 +182,4 @@ * Also see build/tools/fs_config for more details. */ #if !defined(EXCLUDE_FS_CONFIG_STRUCTURES) struct fs_path_config { unsigned mode; unsigned uid; unsigned gid; uint64_t capabilities; const char* prefix; }; /* Rules for directories and files has moved to system/code/libcutils/fs_config.c */ __BEGIN_DECLS /* * Used in: * build/tools/fs_config/fs_config.c * build/tools/fs_get_stats/fs_get_stats.c * system/extras/ext4_utils/make_ext4fs_main.c * external/squashfs-tools/squashfs-tools/android.c * system/core/cpio/mkbootfs.c * system/core/adb/file_sync_service.cpp * system/extras/ext4_utils/canned_fs_config.c */ void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities); ssize_t fs_config_generate(char* buffer, size_t length, const struct fs_path_config* pc); __END_DECLS #endif #endif
libcutils/include/private/fs_config.h +43 −0 Original line number Diff line number Diff line Loading @@ -14,10 +14,24 @@ * limitations under the License. */ /* This file is used to define the properties of the filesystem ** images generated by build tools (mkbootfs and mkyaffs2image) and ** by the device side of adb. */ #ifndef _LIBS_CUTILS_PRIVATE_FS_CONFIG_H #define _LIBS_CUTILS_PRIVATE_FS_CONFIG_H #include <stdint.h> #include <sys/cdefs.h> #if defined(__BIONIC__) #include <linux/capability.h> #else // defined(__BIONIC__) #include "android_filesystem_capability.h" #endif // defined(__BIONIC__) #define CAP_MASK_LONG(cap_name) (1ULL << (cap_name)) /* * binary format for the runtime <partition>/etc/fs_config_(dirs|files) Loading @@ -34,4 +48,33 @@ struct fs_path_config_from_file { char prefix[]; } __attribute__((__aligned__(sizeof(uint64_t)))); struct fs_path_config { unsigned mode; unsigned uid; unsigned gid; uint64_t capabilities; const char* prefix; }; /* Rules for directories and files has moved to system/code/libcutils/fs_config.c */ __BEGIN_DECLS /* * Used in: * build/tools/fs_config/fs_config.c * build/tools/fs_get_stats/fs_get_stats.c * system/extras/ext4_utils/make_ext4fs_main.c * external/squashfs-tools/squashfs-tools/android.c * system/core/cpio/mkbootfs.c * system/core/adb/file_sync_service.cpp * system/extras/ext4_utils/canned_fs_config.c */ void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities); ssize_t fs_config_generate(char* buffer, size_t length, const struct fs_path_config* pc); __END_DECLS #endif /* _LIBS_CUTILS_PRIVATE_FS_CONFIG_H */