[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxwuVMGSaGmbT02LrwfufHXO_gA-POvr1e7TQ4LYCtkcrA@mail.gmail.com>
Date: Wed, 13 Jul 2011 01:25:17 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: Bart Van Assche <bvanassche@....org>
Cc: jbaron@...hat.com, linux-kernel@...r.kernel.org, joe@...ches.com,
gregkh@...e.de, gnb@...h.org
Subject: Re: [PATCH 03/21] dynamic_debug: process multiple commands on a line
On Mon, Jul 11, 2011 at 11:54 PM, Bart Van Assche <bvanassche@....org> wrote:
> On Mon, Jul 11, 2011 at 9:46 AM, Jim Cromie <jim.cromie@...il.com> 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 ?
>
> Bart.
>
no, your printf example still works.
Note that it actually issues 2 writes to the control-file.
root@...age:~# echo 1 > /sys/module/dynamic_debug/parameters/verbose
trol voyage:~# printf "module foo +ap\n module bar +ap" >
/dbg/dynamic_debug/cont
dynamic_debug:ddebug_proc_open: called
dynamic_debug:ddebug_proc_write: read 15 bytes from userspace
dynamic_debug:ddebug_exec_queries: query 0: "module foo +ap
"
dynamic_debug:ddebug_tokenize: split into words: "module" "foo" "+ap"
dynamic_debug:ddebug_parse_query: parsed func="" file="" module="foo"
format="" lineno=0-0
dynamic_debug:ddebug_parse_flags: flags_filter=0x0 op='+' flags=0x21
dynamic_debug:ddebug_parse_flags: *flagsp=0x21 *maskp=0xffffffff
dynamic_debug:ddebug_save_pending: add to pending: func="" file=""
module="foo" format="" lineno=0-0
dynamic_debug:ddebug_save_pending: query saved as pending 1
dynamic_debug:ddebug_exec_query: nfound 0 on func="" file=""
module="foo" format="" lineno=0-0
dynamic_debug:ddebug_exec_queries: processed 1 queries, with 0 errs
dynamic_debug:ddebug_proc_write: read 15 bytes from userspace
dynamic_debug:ddebug_exec_queries: query 0: " module bar +ap"
dynamic_debug:ddebug_tokenize: split into words: "module" "bar" "+ap"
dynamic_debug:ddebug_parse_query: parsed func="" file="" module="bar"
format="" lineno=0-0
dynamic_debug:ddebug_parse_flags: flags_filter=0x0 op='+' flags=0x21
dynamic_debug:ddebug_parse_flags: *flagsp=0x21 *maskp=0xffffffff
dynamic_debug:ddebug_save_pending: add to pending: func="" file=""
module="bar" format="" lineno=0-0
dynamic_debug:ddebug_save_pending: query saved as pending 2
dynamic_debug:ddebug_exec_query: nfound 0 on func="" file=""
module="bar" format="" lineno=0-0
root@...age:~#
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 "
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists