Fix klog open bug in windows
authorsyeon.hwang <syeon.hwang@samsung.com>
Wed, 14 Mar 2012 18:38:33 +0000 (03:38 +0900)
committersyeon.hwang <syeon.hwang@samsung.com>
Wed, 14 Mar 2012 18:38:33 +0000 (03:38 +0900)
qemu-char.c

index 6c9eee5..a2f78c7 100644 (file)
@@ -1814,8 +1814,13 @@ static int qemu_chr_open_win_file_out(QemuOpts *opts, CharDriverState **_chr)
     const char *file_out = qemu_opt_get(opts, "path");
     HANDLE fd_out;
 
+#ifndef CONFIG_MARU
     fd_out = CreateFile(g_win32_locale_filename_from_utf8(file_out), GENERIC_WRITE, FILE_SHARE_READ, NULL,
                         OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+#else
+    fd_out = CreateFile(g_win32_locale_filename_from_utf8(file_out), GENERIC_WRITE, FILE_SHARE_READ, NULL,
+                        CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+#endif
     if (fd_out == INVALID_HANDLE_VALUE) {
         return -EIO;
     }