Function report |
Source Code:kernel\printk\printk.c |
Create Date:2022-07-28 10:07:10 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:The console driver calls this routine during kernel initialization* to register the console printing procedure with printk() and to* print any messages that were printed by the kernel before the* console driver was initialized
Proto:void register_console(struct console *newcon)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct console * | newcon |
| 2667 | If console_drivers && flags & CON_BOOT Then |
| 2678 | If console_drivers && flags & CON_BOOT Then bcon = console_drivers |
| 2681 | If Not has_preferred || bcon || Not console_drivers Then has_preferred = preferred_console >= 0 |
| 2689 | If Not has_preferred Then |
| 2694 | flags |= CON_ENABLED |
| 2695 | If device Then |
| 2696 | flags |= Last on the command line |
| 2697 | has_preferred = true |
| 2706 | When i < Array of consoles built from command line options (console=) && Name of the driver [0] cycle |
| 2709 | If Not match || match(newcon, Name of the driver , Minor dev. to use , Options for the driver ) != 0 Then |
| 2712 | BUILD_BUG_ON - break compile if a condition is true( size of Name of the driver != size of name ) |
| 2713 | If strcmp( Name of the driver , name) != 0 Then Continue |
| 2715 | If index >= 0 && index != Minor dev. to use Then Continue |
| 2718 | If index < 0 Then index = Minor dev. to use |
| 2721 | If _braille_register_console(newcon, c) Then Return |
| 2724 | If setup && setup(newcon, Options for the driver ) != 0 Then Break |
| 2729 | flags |= CON_ENABLED |
| 2730 | If i == preferred_console Then |
| 2731 | flags |= Last on the command line |
| 2732 | has_preferred = true |
| 2734 | Break |
| 2737 | If Not (flags & CON_ENABLED) Then Return |
| 2754 | If ((flags & Last on the command line ) || console_drivers == NULL) Then |
| 2755 | next = console_drivers |
| 2756 | console_drivers = newcon |
| 2757 | If next Then flags &= ~Last on the command line |
| 2759 | Else |
| 2764 | If flags & Use the extended output format a la /dev/kmsg Then Number of registered extended console drivers. ++ |
| 2772 | logbuf_lock_irqsave(flags) |
| 2784 | he next printk record to write to the console = he next printk record to read by syslog(READ) or /proc/kmsg |
| 2785 | console_idx = syslog_idx |
| 2789 | console_sysfs_notify() |
| 2801 | If bcon && (flags & (Last on the command line | CON_BOOT)) == Last on the command line && Not keep_bootcon Then |
| 2808 | If flags & CON_BOOT Then unregister_console(bcon) |
| Name | Describe |
|---|---|
| kgdb_register_callbacks |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |