History log of /external/qemu/android/utils/win32_cmdline_quote.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f0c747e01328e713891f2fa66c4f9df64f580dc2 11-Jul-2014 David 'Digit' Turner <digit@google.com> android/utils/: Proper C++ inclusion guards.

This patch ensures that all headers under android/utils/ have proper
C++ inclusion guards, by using "android/utils/compiler.h" and the
macros it defines (ANDROID_BEGIN_HEADER / ANDROID_END_HEADER).

Just general cleanup before further work.

Change-Id: If37e346a1846af43bfd01dd7fc6999e188a6d025
/external/qemu/android/utils/win32_cmdline_quote.h
7745b32edeb9ec1c2763030bb42a8fc0c3e6d8c4 22-Jan-2014 David 'Digit' Turner <digit@google.com> Fix Windows command-line quoting.

When the 'emulator.exe' program invokes the real emulation program
(e.g. 'emulator-arm.exe' or 'emulator-x86.exe'), it passes its own
command-line arguments through execv().

Unfortunately, on Windows this doesn't work, as the command-line
arguments must be quoted in a special way. This is describ
is described in detail in the MSDN blog post named
"Everyone quotes command line arguments the wrong way" [1]

The code under android/main-emulator.c had several problems:

- It only quoted the first parameter (the program name), but
not any other one.

- The quoting was too naive to work in the general case.

This patch adds a utility function named win32_cmdline_quote()
to perform correct quoting, and changes android/main-emulator.c
to use it.

Fix for http://b.android.com/18317

[1] http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

Change-Id: I7cfd6ddd10706c7aeb6c7df56e20398277d78409
/external/qemu/android/utils/win32_cmdline_quote.h