From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 29 Feb 2016 16:40:59 -0700 Subject: [U-Boot] [PATCH 7/9] Allow command code to compile to nothing In-Reply-To: <1456459256-32643-8-git-send-email-sjg@chromium.org> References: <1456459256-32643-1-git-send-email-sjg@chromium.org> <1456459256-32643-8-git-send-email-sjg@chromium.org> Message-ID: <56D4D70B.3020909@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/25/2016 09:00 PM, Simon Glass wrote: > When CONFIG_CMDLINE is disabled we need to remove all the command-line > code. Most can be removed by dropping the appropriate linker lists from the > images, but sub-commands must be dealt with specially. > > A simple mechanism is used to avoid 'unused static function' errors. > diff --git a/include/command.h b/include/command.h > +/** > + * board_run_command() - Fallback function to execute a command > + * > + * When no command line features are enabled in U-Boot, this function is > + * called to execute a command. Typically the function can look at the > + * command and perform a few very specific tasks, such as booting the > + * system in a particular way. > + * > + * This function is only used when CONFIG_CMDLINE is not enabled. > + * > + * In normal situations this function should not return, since U-Boot will > + * simply hang. > + * > + * @cmdline: Command line string to execute > + * @return 0 if OK, 1 for error > + */ > +int board_run_command(const char *cmdline); Doesn't this need to be part of patch 5/9 too, since the function is first called there?