diff options
author | Marek Vasut <marex@denx.de> | 2012-09-23 17:41:24 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:53:47 -0700 |
commit | 5368c55d4ca463405225dd184ecabf370b715c05 (patch) | |
tree | e1ba15d3d2ca7a971dcdea2569c7335c97a72067 /tools | |
parent | 93ea89f0d979a000e4c47dd8a8991328b2ac8cf7 (diff) | |
download | u-boot-imx-5368c55d4ca463405225dd184ecabf370b715c05.zip u-boot-imx-5368c55d4ca463405225dd184ecabf370b715c05.tar.gz u-boot-imx-5368c55d4ca463405225dd184ecabf370b715c05.tar.bz2 |
COMMON: Use __stringify() instead of MK_STR()
Kill multiple occurances and redeclaration of MK_STR
in favor of __stringify().
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/env/fw_env.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 1a2c227..9f8dfdc 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -121,9 +121,6 @@ static unsigned char active_flag = 1; static unsigned char obsolete_flag = 0; -#define XMK_STR(x) #x -#define MK_STR(x) XMK_STR(x) - static char default_environment[] = { #if defined(CONFIG_BOOTARGS) "bootargs=" CONFIG_BOOTARGS "\0" @@ -138,40 +135,40 @@ static char default_environment[] = { "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0" #endif #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) - "bootdelay=" MK_STR (CONFIG_BOOTDELAY) "\0" + "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0" #endif #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) - "baudrate=" MK_STR (CONFIG_BAUDRATE) "\0" + "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" #endif #ifdef CONFIG_LOADS_ECHO - "loads_echo=" MK_STR (CONFIG_LOADS_ECHO) "\0" + "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0" #endif #ifdef CONFIG_ETHADDR - "ethaddr=" MK_STR (CONFIG_ETHADDR) "\0" + "ethaddr=" __stringify(CONFIG_ETHADDR) "\0" #endif #ifdef CONFIG_ETH1ADDR - "eth1addr=" MK_STR (CONFIG_ETH1ADDR) "\0" + "eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0" #endif #ifdef CONFIG_ETH2ADDR - "eth2addr=" MK_STR (CONFIG_ETH2ADDR) "\0" + "eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0" #endif #ifdef CONFIG_ETH3ADDR - "eth3addr=" MK_STR (CONFIG_ETH3ADDR) "\0" + "eth3addr=" __stringify(CONFIG_ETH3ADDR) "\0" #endif #ifdef CONFIG_ETH4ADDR - "eth4addr=" MK_STR (CONFIG_ETH4ADDR) "\0" + "eth4addr=" __stringify(CONFIG_ETH4ADDR) "\0" #endif #ifdef CONFIG_ETH5ADDR - "eth5addr=" MK_STR (CONFIG_ETH5ADDR) "\0" + "eth5addr=" __stringify(CONFIG_ETH5ADDR) "\0" #endif #ifdef CONFIG_ETHPRIME "ethprime=" CONFIG_ETHPRIME "\0" #endif #ifdef CONFIG_IPADDR - "ipaddr=" MK_STR (CONFIG_IPADDR) "\0" + "ipaddr=" __stringify(CONFIG_IPADDR) "\0" #endif #ifdef CONFIG_SERVERIP - "serverip=" MK_STR (CONFIG_SERVERIP) "\0" + "serverip=" __stringify(CONFIG_SERVERIP) "\0" #endif #ifdef CONFIG_SYS_AUTOLOAD "autoload=" CONFIG_SYS_AUTOLOAD "\0" @@ -180,19 +177,19 @@ static char default_environment[] = { "rootpath=" CONFIG_ROOTPATH "\0" #endif #ifdef CONFIG_GATEWAYIP - "gatewayip=" MK_STR (CONFIG_GATEWAYIP) "\0" + "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0" #endif #ifdef CONFIG_NETMASK - "netmask=" MK_STR (CONFIG_NETMASK) "\0" + "netmask=" __stringify(CONFIG_NETMASK) "\0" #endif #ifdef CONFIG_HOSTNAME - "hostname=" MK_STR (CONFIG_HOSTNAME) "\0" + "hostname=" __stringify(CONFIG_HOSTNAME) "\0" #endif #ifdef CONFIG_BOOTFILE "bootfile=" CONFIG_BOOTFILE "\0" #endif #ifdef CONFIG_LOADADDR - "loadaddr=" MK_STR (CONFIG_LOADADDR) "\0" + "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" #endif #ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0" @@ -201,7 +198,7 @@ static char default_environment[] = { "clocks_in_mhz=" "1" "\0" #endif #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) - "pcidelay=" MK_STR (CONFIG_PCI_BOOTDELAY) "\0" + "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY) "\0" #endif #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG "arch=" CONFIG_SYS_ARCH "\0" @@ -411,7 +408,7 @@ int fw_env_write(char *name, char *value) (strcmp(name, "serial#") == 0) || ((strcmp(name, "ethaddr") == 0) #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) - && (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0) + && (strcmp(oldval, __stringify(CONFIG_ETHADDR)) != 0) #endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */ ) ) { fprintf (stderr, "Can't overwrite \"%s\"\n", name); |