cli: Extract basic CLI init into cli_common
Move the first initialization steps (log callback setting,
version/banner printing, and libflashprog init) into a new
function cli_init(). This will be shared by other CLIs.
Change-Id: I9f19006aac18ffcdc05159957d58a2668c41e2b1
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72987
diff --git a/include/cli.h b/include/cli.h
index aec1a46..b7a0340 100644
--- a/include/cli.h
+++ b/include/cli.h
@@ -60,4 +60,6 @@
int cli_parse_layout_args(struct layout_args *, int opt, const char *optarg);
int cli_process_layout_args(struct flashprog_layout **, struct flashprog_flashctx *, const struct layout_args *);
+int cli_init(void);
+
#endif