Change dead code in "test" cmd to debug output
authorJoe Hershberger <joe.hershberger@ni.com>
Fri, 17 Aug 2012 10:56:12 +0000 (10:56 +0000)
committerjino.cho <jino.cho@samsung.com>
Tue, 28 Feb 2017 09:59:05 +0000 (18:59 +0900)
Improve debug output for test by indicating the number of parameters
and quoting the parameters to make it clear exactly what each contains

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
common/cmd_test.c

index fcb5ef2f7199a695b4267249666b7e652e4c0291..6da06b9f788417c451523e5deac0d4cfa1c43c90 100644 (file)
@@ -33,12 +33,12 @@ int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        if (argc < 3)
                return 1;
 
-#if 0
+#ifdef DEBUG
        {
-               printf("test:");
+               debug("test(%d):", argc);
                left = 1;
                while (argv[left])
-                       printf(" %s", argv[left++]);
+                       debug(" '%s'", argv[left++]);
        }
 #endif