lkml.org 
[lkml]   [2011]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 03/21] dynamic_debug: process multiple commands on a line
On Mon, Jul 11, 2011 at 11:54 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> On Mon, Jul 11, 2011 at 9:46 AM, Jim Cromie <jim.cromie@gmail.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@voyage:~# 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@voyage:~#
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-13 09:27    [from the cache]
©2003-2011 Jasper Spaans