1 #ifndef ANDROID_PERMS_H
2 # define ANDROID_PERMS_H
3
4 # include "config.h"
5 # include <ext2fs/ext2fs.h>
6
7 typedef void (*fs_config_f)(const char *path, int dir,
8 const char *target_out_path,
9 unsigned *uid, unsigned *gid,
10 unsigned *mode, uint64_t *capabilities);
11
12 # ifdef _WIN32
13 struct selabel_handle;
android_configure_fs(ext2_filsys fs,char * src_dir,char * target_out,char * mountpoint,char * file_contexts,char * fs_config_file,time_t fixed_time)14 static inline errcode_t android_configure_fs(ext2_filsys fs,
15 char *src_dir,
16 char *target_out,
17 char *mountpoint,
18 char *file_contexts,
19 char *fs_config_file,
20 time_t fixed_time)
21 {
22 return 0;
23 }
24 # else
25 # include <selinux/selinux.h>
26 # include <selinux/label.h>
27 # if !defined(HOST)
28 # include <selinux/android.h>
29 # endif
30 # include <private/android_filesystem_config.h>
31 # include <private/canned_fs_config.h>
32
33 errcode_t android_configure_fs(ext2_filsys fs, char *src_dir,
34 char *target_out,
35 char *mountpoint,
36 char *file_contexts,
37 char *fs_config_file, time_t fixed_time);
38
39 # endif
40 #endif /* !ANDROID_PERMS_H */
41