mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
common/cmd_[i-z]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
This commit is contained in:
parent
a76adc8142
commit
65c450b47a
25 changed files with 92 additions and 71 deletions
|
@ -28,7 +28,7 @@
|
|||
#include <command.h>
|
||||
#include <net.h>
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_NET)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
|
||||
|
||||
|
||||
extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
|
||||
|
@ -68,7 +68,7 @@ U_BOOT_CMD(
|
|||
"[loadAddress] [bootfilename]\n"
|
||||
);
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_DHCP)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_DHCP) || defined(CONFIG_CMD_DHCP)
|
||||
int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
return netboot_common(DHCP, cmdtp, argc, argv);
|
||||
|
@ -81,7 +81,7 @@ U_BOOT_CMD(
|
|||
);
|
||||
#endif /* CFG_CMD_DHCP */
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_NFS)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS)
|
||||
int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
return netboot_common(NFS, cmdtp, argc, argv);
|
||||
|
@ -137,13 +137,15 @@ static void netboot_update_env (void)
|
|||
if (NetOurNISDomain[0])
|
||||
setenv ("domain", NetOurNISDomain);
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_SNTP) && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET)
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)) \
|
||||
&& (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET)
|
||||
if (NetTimeOffset) {
|
||||
sprintf (tmp, "%d", NetTimeOffset);
|
||||
setenv ("timeoffset", tmp);
|
||||
}
|
||||
#endif
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_SNTP) && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
|
||||
#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)) \
|
||||
&& (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
|
||||
if (NetNtpServerIP) {
|
||||
ip_to_string (NetNtpServerIP, tmp);
|
||||
setenv ("ntpserverip", tmp);
|
||||
|
@ -220,7 +222,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
|
|||
return rcode;
|
||||
}
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_PING)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING)
|
||||
int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2)
|
||||
|
@ -249,7 +251,7 @@ U_BOOT_CMD(
|
|||
);
|
||||
#endif /* CFG_CMD_PING */
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_CDP)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP)
|
||||
|
||||
static void cdp_update_env(void)
|
||||
{
|
||||
|
@ -292,7 +294,7 @@ U_BOOT_CMD(
|
|||
);
|
||||
#endif /* CFG_CMD_CDP */
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_SNTP)
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)
|
||||
int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
char *toff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue