From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvSQM-0004EY-5a for qemu-devel@nongnu.org; Thu, 21 May 2015 11:30:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvSQH-0002Bd-Kx for qemu-devel@nongnu.org; Thu, 21 May 2015 11:30:18 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:35052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvSQH-0002BZ-Gy for qemu-devel@nongnu.org; Thu, 21 May 2015 11:30:13 -0400 Received: by iesa3 with SMTP id a3so10940799ies.2 for ; Thu, 21 May 2015 08:30:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <078E10E9-9879-4EB6-8D09-AADB88EAACAB@livius.net> References: <1431085311-24617-1-git-send-email-leon.alrae@imgtec.com> <1431085311-24617-3-git-send-email-leon.alrae@imgtec.com> <555C41BF.3070900@imgtec.com> <555DE45B.4030101@imgtec.com> <3F8E8763-93C1-4027-A7E3-888BCDEE96BE@livius.net> <078E10E9-9879-4EB6-8D09-AADB88EAACAB@livius.net> From: Peter Maydell Date: Thu, 21 May 2015 16:29:52 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liviu Ionescu Cc: Christopher Covington , Leon Alrae , QEMU Developers , Matthew Fortune On 21 May 2015 at 16:24, Liviu Ionescu wrote: > >> On 21 May 2015, at 18:06, Peter Maydell wrote: >> >> ... >> That's their choice... It is still an array of substrings, >> but if the user only provides one string then we have an >> array of length 1. > > this was my initial point, as long as you offer the choice, > you no longer have consistent usage between ARM and MIPS, > the ARM users will prefer the array of length 1. There's no way to not offer the choice. In your syntax this would be --semihosting-cmdline "foo bar baz" >> ... >> Adding quotes and apostrophes seems wrong to me, >> because it's making assumptions about the guest's >> handling of the semihosting string. > > yes, it is making the assumption that the guest code is able to > process args with embedded spaces. once this accepted, properly > parsing the quotes and apostrophes is required anyway Required by who? It's not in the semihosting API. You could perfectly well have a guest which required arguments with spaces to be quoted via <> characters, or which just treated the whole string as a single element, or which didn't have any quoting support... -- PMM