xref: /OK3568_Linux_fs/external/recovery/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_check_and_resizefs(const char *filename);
34 int rk_check_and_resizefs_f2fs(const char *filename);
35 size_t rk29_fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
36 size_t rk29_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
37 
38 int make_ext2(const char *path, const char *label);
39 int make_ext4(const char *path, const char *label);
40 int make_vfat(const char *path, const char *label);
41 int make_ntfs(const char *path, const char *label);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif  // RECOVERY_RK29_H_
48