Modify the location of log output for "sdb shell" routine.
authorKim Gunsoo <gunsoo83.kim@samsung.com>
Thu, 17 Mar 2016 11:46:13 +0000 (20:46 +0900)
committerKim Gunsoo <gunsoo83.kim@samsung.com>
Thu, 17 Mar 2016 11:46:13 +0000 (20:46 +0900)
- When run the "sdb shell" routine in Windows OS, unnecessary
  logs are output to stdout.
  Modify the location of log output.(stdout -> internal log system)

Change-Id: I44015dc5ad22522f3fa46de0313ead0a3fd18c2f
Signed-off-by: Kim Gunsoo <gunsoo83.kim@samsung.com>
src/commandline.c

index cab724bede72d112da45a216ee095f2f0c0c5952..2060cbafce443786db720ea6658b8a16f4091514 100755 (executable)
@@ -143,19 +143,19 @@ void sdb_shell_stdin_init(int fd)
     g_input_handle = GetStdHandle(STD_INPUT_HANDLE);
 
     if(g_input_handle == INVALID_HANDLE_VALUE) {
-        fprintf(stdout, "error: fail to get the stdin handle\n");
+        D("error: fail to get the stdin handle\n");
         g_input_handle = NULL;
         return;
     }
 
     if(!GetConsoleMode(g_input_handle, &g_console_mode_save)) {
-        fprintf(stdout, "error: fail to get the stdin console mode\n");
+        D("error: fail to get the stdin console mode\n");
         g_input_handle = NULL;
         return;
     }
 
     if(!SetConsoleMode(g_input_handle, ENABLE_MOUSE_INPUT)) {
-        fprintf(stdout, "error: fail to set console mode\n");
+        D("error: fail to set console mode\n");
         return;
     }
 }
@@ -168,7 +168,7 @@ void sdb_shell_stdin_restore(int fd)
 
     if (g_input_handle != NULL) {
         if(!SetConsoleMode(g_input_handle, g_console_mode_save)) {
-            fprintf(stdout, "error: fail to restore console mode\n");
+            D("error: fail to restore console mode\n");
         }
         g_input_handle = NULL;
     }
@@ -184,7 +184,7 @@ void *stdin_read_thread(void *args)
     if(g_console_mode_save != NULL) {
         while(1) {
             if(!ReadConsoleInput(g_input_handle, &i_record, 1, &cNumRead)) {
-                fprintf(stdout, "error: fail to read console standard input\n");
+                D("error: fail to read console standard input\n");
                 break;
             }