1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

layout: Tidy up the include-args API

Move all forward declarations into `layout.h`, use consistent naming.

Change-Id: I0e87c9d91b9bc4d78f9cee98caff6985803f7be7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54287
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nico Huber 2021-05-14 01:11:08 +02:00
parent d855351ce7
commit 7dd1624a7d
4 changed files with 6 additions and 7 deletions

View File

@ -857,7 +857,7 @@ out:
free(flashes[i].chip); free(flashes[i].chip);
} }
layout_cleanup(&include_args); cleanup_include_args(&include_args);
free(filename); free(filename);
free(fmapfile); free(fmapfile);
free(referencefile); free(referencefile);

View File

@ -417,10 +417,6 @@ __attribute__((format(printf, 2, 3)));
#define msg_pspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* programmer debug spew */ #define msg_pspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* programmer debug spew */
#define msg_cspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* chip debug spew */ #define msg_cspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* chip debug spew */
/* layout.c */
int register_include_arg(struct layout_include_args **args, const char *arg);
void layout_cleanup(struct layout_include_args **args);
/* spi.c */ /* spi.c */
struct spi_command { struct spi_command {
unsigned int writecnt; unsigned int writecnt;

View File

@ -274,7 +274,7 @@ int included_regions_overlap(const struct flashrom_layout *const l)
return overlap_detected; return overlap_detected;
} }
void layout_cleanup(struct layout_include_args **args) void cleanup_include_args(struct layout_include_args **args)
{ {
struct layout_include_args *tmp; struct layout_include_args *tmp;

View File

@ -55,9 +55,12 @@ const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const f
int layout_from_file(struct flashrom_layout **, const char *name); int layout_from_file(struct flashrom_layout **, const char *name);
int register_include_arg(struct layout_include_args **args, const char *arg);
int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args);
void cleanup_include_args(struct layout_include_args **args);
int get_region_range(struct flashrom_layout *const l, const char *name, int get_region_range(struct flashrom_layout *const l, const char *name,
unsigned int *start, unsigned int *len); unsigned int *start, unsigned int *len);
int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args);
const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t); const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t);
const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *); const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
const struct romentry *layout_next(const struct flashrom_layout *, const struct romentry *); const struct romentry *layout_next(const struct flashrom_layout *, const struct romentry *);