1ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross/*
2ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * Copyright (C) 2010 The Android Open Source Project
3ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross *
4ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * Licensed under the Apache License, Version 2.0 (the "License");
5ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * you may not use this file except in compliance with the License.
6ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * You may obtain a copy of the License at
7ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross *
8ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross *      http://www.apache.org/licenses/LICENSE-2.0
9ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross *
10ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * Unless required by applicable law or agreed to in writing, software
11ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * distributed under the License is distributed on an "AS IS" BASIS,
12ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * See the License for the specific language governing permissions and
14ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross * limitations under the License.
15ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross */
16ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross
17ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross#ifndef _MAKE_EXT4FS_H_
18ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross#define _MAKE_EXT4FS_H_
19ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross
20ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross#include "ext4_utils.h"
21ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross#include "ext4.h"
22ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross
23e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker#ifdef __cplusplus
24e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongkerextern "C" {
25e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker#endif
26e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker
27b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley#ifdef HAVE_SELINUX
28b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley#include <selinux/selinux.h>
29b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley#include <selinux/label.h>
30b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley#else
31b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalleystruct selabel_handle;
32b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley#endif
33b4eca4b24af9c80ebb2a7fa2ba539a48096b7576Stephen Smalley
3468e3dfd81ddb9367a0c3e0c72148c23a3227ed48Kenny Roottypedef void (*fs_config_func_t)(const char *path, int dir, unsigned *uid, unsigned *gid,
3568e3dfd81ddb9367a0c3e0c72148c23a3227ed48Kenny Root        unsigned *mode);
3668e3dfd81ddb9367a0c3e0c72148c23a3227ed48Kenny Root
37263eefd9fb9608432636c903423e43848e69f39dDoug Zongkervoid reset_ext4fs_info();
386ece70806883534d29a74b9785871505f71ecc1fStephen Smalleyint make_ext4fs(const char *filename, s64 len,
396ece70806883534d29a74b9785871505f71ecc1fStephen Smalley                const char *mountpoint, struct selabel_handle *sehnd);
400349bd9f14d252673a7a25767da4a80121aaaaf2Anatol Pomazauint make_ext4fs_internal(int fd, const char *directory,
4168e3dfd81ddb9367a0c3e0c72148c23a3227ed48Kenny Root                         char *mountpoint, fs_config_func_t fs_config_func, int gzip, int sparse,
422e5c52322d54d0f98d36b499fcaa31a0e84ca87cKenny Root                         int crc, int wipe, int init_itabs, struct selabel_handle *sehnd);
43263eefd9fb9608432636c903423e43848e69f39dDoug Zongker
44e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker#ifdef __cplusplus
45e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker}
46e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker#endif
47e8d74ff5c3253403d3e5c96edc80dfc3e5f8ada8Doug Zongker
48ec0a2e83dc66d67addeb90e83144187691852a3eColin Cross#endif
49