]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Move CONFIG_SYS_VSNPRINTF to Kconfig
authorSimon Glass <sjg@chromium.org>
Fri, 6 Mar 2015 20:19:02 +0000 (13:19 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:28:59 +0000 (22:28 +0200)
Move this over to Kconfig and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/Kconfig
configs/sandbox_defconfig
include/configs/sandbox.h
include/configs/x86-common.h
lib/Kconfig

index b44f709253ff99c054aad5d33a40b26ab7926dad..3f1401ae4d35427ce704bab845d718153e72d891 100644 (file)
@@ -7,6 +7,9 @@ config SYS_ARCH
 config USE_PRIVATE_LIBGCC
        default y
 
+config SYS_VSNPRINTF
+       default y
+
 choice
        prompt "Target select"
 
index 5a06396ecc8aeb491e51df6088add30df8301c10..9fa60bdbece740058eec249e70a0d2b097557ced 100644 (file)
@@ -20,3 +20,4 @@ CONFIG_USB_STORAGE=y
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_SANDBOX_GPIO=y
+CONFIG_SYS_VSNPRINTF=y
index 5ad4761c720b8bd26e99bfc09137c6629cef7a02..f714298d54698d26c1e81ba2ed01fc772cc4e747 100644 (file)
@@ -48,8 +48,6 @@
 #define CONFIG_CMD_FS_GENERIC
 #define CONFIG_CMD_MD5SUM
 
-#define CONFIG_SYS_VSNPRINTF
-
 #define CONFIG_CMD_GPIO
 
 #define CONFIG_CMD_GPT
index b378f5872f9a123ac4a6aa84175358df9a657b41..9571c656be07b87c0098e67db6af80b30f5fd2f0 100644 (file)
@@ -16,7 +16,6 @@
  * (easy to change)
  */
 #define CONFIG_SHOW_BOOT_PROGRESS
-#define CONFIG_SYS_VSNPRINTF
 #define CONFIG_ZBOOT_32
 #define CONFIG_PHYSMEM
 #define CONFIG_DISPLAY_BOARDINFO_LATE
index f3ea0555f2274379e523ca0f8bf88d85d84ee452..4a4980996a99e18569f45c4e13d124644807622d 100644 (file)
@@ -8,6 +8,9 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
 
          If unsure, say N.
 
+config LIB_RAND
+       bool
+
 config HAVE_PRIVATE_LIBGCC
        bool
 
@@ -27,8 +30,14 @@ config SYS_HZ
          get_timer() must operate in milliseconds and this option must be
          set to 1000.
 
-config LIB_RAND
-       bool
+config SYS_VSNPRINTF
+       bool "Enable safe version of sprintf()"
+       help
+         Since sprintf() can overflow its buffer, it is common to use
+         snprintf() instead, which knows the buffer size and can avoid
+         overflow. However, this does increase code size slightly (for
+         Thumb-2, about 420 bytes). Enable this option for safety when
+         using sprintf() with data you do not control.
 
 source lib/rsa/Kconfig