1 /*
2  * Copyright (C) 2007 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* This file is used to define the properties of the filesystem
18 ** images generated by build tools (mkbootfs and mkyaffs2image) and
19 ** by the device side of adb.
20 */
21 
22 #pragma once
23 
24 #include <stdint.h>
25 #include <sys/cdefs.h>
26 
27 #if defined(__BIONIC__)
28 #include <linux/capability.h>
29 #else  // defined(__BIONIC__)
30 #include <private/android_filesystem_capability.h>
31 #endif  // defined(__BIONIC__)
32 
33 /* Rules for directories and files has moved to system/code/libcutils/fs_config.c */
34 
35 __BEGIN_DECLS
36 
37 /*
38  * Used in:
39  *  build/tools/fs_config/fs_config.c
40  *  build/tools/fs_get_stats/fs_get_stats.c
41  *  system/extras/ext4_utils/make_ext4fs_main.c
42  *  external/squashfs-tools/squashfs-tools/android.c
43  *  system/core/cpio/mkbootfs.c
44  *  system/core/adb/file_sync_service.cpp
45  *  system/extras/ext4_utils/canned_fs_config.c
46  */
47 void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid,
48                unsigned* mode, uint64_t* capabilities);
49 
50 __END_DECLS
51