Fix bootimg.cmdline to use ShellEscapeIncludingSpaces
bootimg.cmdline should be passed to mkbootimg's --cmdline flag as a
single argument. Because cmdline can have spaces we should escape it
with ShellEscapeIncludingSpaces rather than blindly putting double
qoutes with ShellEscape, which also puts single quotes when necessary.
Bug: 182092664
Test: m nothing && see build.ninja (microdroid's build commands)
Test: boot microdroid on VIM3L
Change-Id: I5d766bb0a816d829569c9ebfddf97c4f846f78f8
diff --git a/filesystem/bootimg.go b/filesystem/bootimg.go
index 764f045..81b3dbb 100644
--- a/filesystem/bootimg.go
+++ b/filesystem/bootimg.go
@@ -153,7 +153,7 @@
if vendor {
flag = "--vendor_cmdline "
}
- cmd.FlagWithArg(flag, "\""+proptools.ShellEscape(cmdline)+"\"")
+ cmd.FlagWithArg(flag, proptools.ShellEscapeIncludingSpaces(cmdline))
}
headerVersion := proptools.String(b.properties.Header_version)