Re: [PATCH 03/21] dynamic_debug: process multiple commands on a line

From: Bart Van Assche
Date: Wed Jul 13 2011 - 13:44:56 EST


On Wed, Jul 13, 2011 at 9:25 AM, Jim Cromie <jim.cromie@xxxxxxxxx> wrote:
> On Mon, Jul 11, 2011 at 11:54 PM, Bart Van Assche <bvanassche@xxxxxxx> wrote:
> > On Mon, Jul 11, 2011 at 9:46 AM, Jim Cromie <jim.cromie@xxxxxxxxx> wrote:
> >> Process multiple commands per line, separated by ';'.  All commands are
> >> processed, independent of errors, allowing individual commands to fail,
> >> for example when a module is not installed.  Last error code is returned.
> >> With this, extensive command sets can be given on the boot-line.
> >
> > Does the above mean that semicolon is considered a valid separator but
> > newline not ?
>
> no, your printf example still works.
> Note that it actually issues 2 writes to the control-file.
>
> root@voyage:~# echo 1 > /sys/module/dynamic_debug/parameters/verbose
> trol voyage:~# printf "module foo +ap\n module bar +ap" >
> /dbg/dynamic_debug/cont
>
> FWIW, the \n approach doesnt help on the boot-line;
> on mainline, the following will break the facility -
> /dbg/dynamic_debug will not get created.
>
> Kernel command line: ...  ddebug_query="module pc8736x_gpio +p \n
> module nsc_gpio +p "

Just as a note, I do not expect that anyone will pass a string
containing an embedded newline via the kernel command line but I do
expect that people will use cat or printf to send multiple queries at
once to /sys/kernel/debug/dynamic_debug/control.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/