Re: [PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-25 Thread Michal Suchánek
On Fri, 15 Sep 2017 19:28:56 +0200 Michal Suchánek wrote: > On Fri, 15 Sep 2017 18:14:09 +0100 > Al Viro wrote: > > > On Fri, Sep 15, 2017 at 07:02:46PM +0200, Michal Suchanek wrote: > > > > > for (i = 0; args[i]; i++) { > > > - if (isspace(args[i]) && !in_quote) > > > + if

Re: [PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Michal Suchánek
On Fri, 15 Sep 2017 18:14:09 +0100 Al Viro wrote: > On Fri, Sep 15, 2017 at 07:02:46PM +0200, Michal Suchanek wrote: > > > for (i = 0; args[i]; i++) { > > - if (isspace(args[i]) && !in_quote) > > + if (isspace(args[i]) && !in_quote && !backslash) > > b

Re: [PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Al Viro
On Fri, Sep 15, 2017 at 07:02:46PM +0200, Michal Suchanek wrote: > for (i = 0; args[i]; i++) { > - if (isspace(args[i]) && !in_quote) > + if (isspace(args[i]) && !in_quote && !backslash) > break; > - if (equals == 0) { > -

[PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Michal Suchanek
This allows passing quotes in kernel arguments. It is useful for passing fadump nested arguemnts in fadump_extra_args and might be useful if somebody wanted to pass a double quote directly as part of an argument. It is also useful to have quoting grammar more similar to shells and bootloaders. Si