xref: /OK3568_Linux_fs/external/rk_pcba_test/pcba_minui/mtdutils/rk29.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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 #ifndef RECOVERY_RK29_H_
18 #define RECOVERY_RK29_H_
19 
20 #include <stdio.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #define READ_SIZE 16384
27 #define READ_MASK (READ_SIZE - 1)
28 
29 #define WRITE_SIZE 16384
30 #define WRITE_MASK (WRITE_SIZE - 1)
31 
32 int run(const char *filename, char *const argv[]);
33 int rk_make_ext3fs(const char *filename);
34 int rk_check_and_resizefs(const char *filename);
35 int rk_check_and_resizefs_f2fs(const char *filename);
36 int rk_make_ext4fs(const char *filename, long long len, const char *mountpoint);
37 size_t rk29_fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
38 size_t rk29_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
39 int make_vfat(const char *filename,const char* volumelabel);
40 int make_ntfs(const char *filename,const char* volumelabel);
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif  // RECOVERY_RK29_H_
47