From 26722dde31c3467cd31a078662810927eec05de5 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 24 Feb 2011 16:40:20 +0100 Subject: Quote concatenated QEMU options when -verbose is used. Change-Id: I2d95fa0aa9a5f679372dfd1ae7c7cec906c3049d --- android/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'android/main.c') diff --git a/android/main.c b/android/main.c index a061ecf..198212f 100644 --- a/android/main.c +++ b/android/main.c @@ -865,7 +865,14 @@ int main(int argc, char **argv) /* Dump final command-line option to make debugging the core easier */ printf("Concatenated QEMU options:\n"); for (i = 0; i < n; i++) { - printf(" %s", args[i]); + /* To make it easier to copy-paste the output to a command-line, + * quote anything that contains spaces. + */ + if (strchr(args[i], ' ') != NULL) { + printf(" '%s'", args[i]); + } else { + printf(" %s", args[i]); + } } printf("\n"); } -- cgit v1.1