函数逻辑报告 |
Source Code:kernel\printk\printk.c |
Create Date:2022-07-27 11:07:17 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:void register_console(struct console *newcon)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct console * | newcon |
2667 | 如果console_drivers且flags按位与CON_BOOT则 |
2678 | 如果console_drivers且flags按位与CON_BOOT则bcon等于console_drivers |
2681 | 如果非has_preferred或bcon或非console_drivers则has_preferred等于preferred_console大于等于0 |
2689 | 如果非has_preferred则 |
2694 | flags或等于CON_ENABLED |
2695 | 如果device则 |
2696 | flags或等于Last on the command line |
2697 | has_preferred = true |
2709 | 如果非match或match(newcon, Name of the driver , Minor dev. to use , Options for the driver )不等于0则 |
2712 | BUILD_BUG_ON - break compile if a condition is true( Name of the driver 的长度 != name的长度) |
2713 | 如果字符串比较不等于0则继续下一循环 |
2715 | 如果index大于等于0且index不等于 Minor dev. to use 则继续下一循环 |
2718 | 如果index小于0则index等于 Minor dev. to use |
2721 | 如果_braille_register_console(newcon, c)则返回 |
2724 | 如果setup且setup(newcon, Options for the driver )不等于0则退出 |
2729 | flags或等于CON_ENABLED |
2730 | 如果i恒等于preferred_console则 |
2731 | flags或等于Last on the command line |
2732 | has_preferred = true |
2734 | 退出 |
2737 | 如果非flags按位与CON_ENABLED的值则返回 |
2754 | 如果((flags & Last on the command line ) || console_drivers == NULL)则 |
2755 | next等于console_drivers |
2756 | console_drivers等于newcon |
2757 | 如果next则flags与等于Last on the command line 的反 |
2759 | 否则 |
2764 | 如果flags按位与Use the extended output format a la /dev/kmsg 则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 | 如果bcon且flags按位与Last on the command line 按位或CON_BOOT的值的值恒等于Last on the command line 且非keep_bootcon则 |
2808 | 如果flags按位与CON_BOOT则unregister_console(bcon) |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |