• Jim Cromie's avatar
    params: add 3rd arg to option handler callback signature · 9fb48c74
    Jim Cromie authored
    Add a 3rd arg, named "doing", to unknown-options callbacks invoked
    from parse_args(). The arg is passed as:
    
      "Booting kernel" from start_kernel(),
      initcall_level_names[i] from do_initcall_level(),
      mod->name from load_module(), via parse_args(), parse_one()
    
    parse_args() already has the "name" parameter, which is renamed to
    "doing" to better reflect current uses 1,2 above.  parse_args() passes
    it to an altered parse_one(), which now passes it down into the
    unknown option handler callbacks.
    
    The mod->name will be needed to handle dyndbg for loadable modules,
    since params passed by modprobe are not qualified (they do not have a
    "$modname." prefix), and by the time the unknown-param callback is
    called, the module name is not otherwise available.
    
    Minor tweaks:
    
    Add param-name to parse_one's pr_debug(), current message doesnt
    identify the param being handled, add it.
    
    Add a pr_info to print current level and level_name of the initcall,
    and number of registered initcalls at that level.  This adds 7 lines
    to dmesg output, like:
    
       initlevel:6=device, 172 registered initcalls
    
    Drop "parameters" from initcall_level_names[], its unhelpful in the
    pr_info() added above.  This array is passed into parse_args() by
    do_initcall_level().
    
    CC: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
    Acked-by: default avatarJason Baron <jbaron@redhat.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9fb48c74
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...