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,void * seopts,unsigned int nopt,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 void *seopts,
19 unsigned int nopt,
20 char *fs_config_file,
21 time_t fixed_time)
22 {
23 return 0;
24 }
25 # else
26 # include <selinux/selinux.h>
27 # include <selinux/label.h>
28 # if defined(__ANDROID__)
29 # include <selinux/android.h>
30 # endif
31 # include <private/android_filesystem_config.h>
32 # include <private/canned_fs_config.h>
33
34 errcode_t android_configure_fs(ext2_filsys fs, char *src_dir,
35 char *target_out,
36 char *mountpoint,
37 struct selinux_opt *seopts,
38 unsigned int nopt,
39 char *fs_config_file, time_t fixed_time);
40
41 # endif
42 #endif /* !ANDROID_PERMS_H */
43