Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753515AbdHULaJ (ORCPT ); Mon, 21 Aug 2017 07:30:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:58958 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752757AbdHULaI (ORCPT ); Mon, 21 Aug 2017 07:30:08 -0400 Date: Mon, 21 Aug 2017 13:30:03 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Baoquan He Cc: linux-doc@vger.kernel.org, Lokesh Vutla , Viresh Kumar , David Howells , "Sylvain 'ythier' Hitier" , Paul Mackerras , Hari Bathini , Ingo Molnar , Michael Neuling , Jonathan Corbet , Ilya Matveychikov , Mahesh J Salgaonkar , Thiago Jung Bauermann , Kees Cook , Rusty Russell , Nicholas Piggin , Scott Wood , Jason Baron , "Steven Rostedt, " , Thomas Gleixner , Daniel Axtens , linux-kernel@vger.kernel.org, "Aneesh Kumar K.V" , Jessica Yu , Tejun Heo , "Oliver O'Halloran" , Andrew Morton , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v7 3/4] lib/cmdline.c Remove quotes symmetrically. Message-ID: <20170821133003.1855fc4e@kitsune.suse.cz> In-Reply-To: <20170821102712.GF20615@x1> References: <78655b3689f6cd0c76b787b8ef2c824ef75a99a5.1503000577.git.msuchanek@suse.de> <0e0a8ad11e2c9c7db02baa1bbb5a30f429586854.1503000577.git.msuchanek@suse.de> <20170821102712.GF20615@x1> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 28 On Mon, 21 Aug 2017 18:27:12 +0800 Baoquan He wrote: > On 08/17/17 at 10:14pm, Michal Suchanek wrote: > > Remove quotes from argument value only if there is qoute on both > > sides. > > > > Signed-off-by: Michal Suchanek > > Sounds reasonable. Just for curiosity, do we have chance to pass in > option with a single '"'? No, we don't. Perhaps it would work if it was at the end of the commandline. next_arg checks that quoting is closed. It was possible but undocumented with previous behavior - you would place the quote in the middle and the closing quote at start or end so that next_arg would remove the closing quote but not the one in the middle. It would be also possible with shell-like backslash escaping but that is not implemented. Thanks Michal