X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fcli.h;h=3449fa6ae72767a60b37d1fb55ecf76f7af61212;hb=92832045c54586e9dffa082ff8cd8c2ef6040757;hp=699426252c82b11eb9e7955184612f12c12667e8;hpb=9a650bfec34c10baf673f9ab95f00dec7210e8c6;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/cli.h b/include/cli.h index 6994262..3449fa6 100644 --- a/include/cli.h +++ b/include/cli.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2014 Google, Inc * Simon Glass - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __CLI_H @@ -31,6 +30,16 @@ void cli_simple_loop(void); int cli_simple_run_command(const char *cmd, int flag); /** + * cli_simple_process_macros() - Expand $() and ${} format env. variables + * + * @param input Input string possible containing $() / ${} vars + * @param output Output string with $() / ${} vars expanded + * @param max_size Maximum size of @output (including terminator) + * @return 0 if OK, -ENOSPC if we ran out of space in @output + */ +int cli_simple_process_macros(const char *input, char *output, int max_size); + +/** * cli_simple_run_command_list() - Execute a list of command * * The commands should be separated by ; or \n and will be executed @@ -100,7 +109,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, */ int cli_simple_parse_line(char *line, char *argv[]); -#ifdef CONFIG_OF_CONTROL +#if CONFIG_IS_ENABLED(OF_CONTROL) /** * cli_process_fdt() - process the boot command from the FDT *