• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 MKDTIMG_CORE_H
18 #define MKDTIMG_CORE_H
19 
20 #include <stdint.h>
21 #include <stdio.h>
22 
23 #define OPTION_VALUE_SIZE_MAX 512
24 
25 
26 struct dt_image_writer;
27 
28 int parse_option(char **option_ptr, char **value_ptr, char *line_str);
29 int parse_path(char **path_ptr, char **prop_ptr, char *value_str);
30 
31 struct dt_image_writer *dt_image_writer_start(FILE *img_fp, uint32_t entry_count);
32 int set_global_options(struct dt_image_writer *writer, const char *option, const char *value);
33 int set_entry_options(struct dt_image_writer *writer, const char *option, const char *value);
34 int dt_image_writer_add_entry(struct dt_image_writer *writter, const char *fdt_filename);
35 int dt_image_writer_end(struct dt_image_writer *writter);
36 
37 #endif
38