函数逻辑报告 |
Source Code:kernel\printk\printk.c |
Create Date:2022-07-27 11:06:36 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_syslog
函数原型:int do_syslog(int type, char __user *buf, int len, int source)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| int | type | |
| char __user * | buf | |
| int | len | |
| int | source |
| 1505 | bool clear = false |
| 1509 | error等于check_syslog_permissions(type, source) |
| 1514 | 当:type恒等于Close the log. Currently a NOP. |
| 1515 | 退出 |
| 1516 | 当:type恒等于Open the log. Currently a NOP. |
| 1517 | 退出 |
| 1518 | 当:type恒等于Read from the log. |
| 1521 | 如果非len则返回:0 |
| 1529 | error等于syslog_print(buf, len) |
| 1530 | 退出 |
| 1533 | clear = true |
| 1539 | 如果非len则返回:0 |
| 1543 | error等于syslog_print_all(buf, len, clear) |
| 1544 | 退出 |
| 1546 | 当:type恒等于Clear ring buffer. |
| 1547 | syslog_clear() |
| 1548 | 退出 |
| 1550 | 当:type恒等于Disable printk's to console |
| 1551 | 如果saved_console_loglevel恒等于default (or last) loglevel 则saved_console_loglevel等于console_loglevel |
| 1554 | 退出 |
| 1556 | 当:type恒等于Enable printk's to console |
| 1568 | console_loglevel等于len |
| 1571 | 退出 |
| 1577 | he next printk record to read by syslog(READ) or /proc/kmsg 等于dex and sequence number of the first record stored in the buffer |
| 1578 | syslog_idx等于log_first_idx |
| 1579 | syslog_partial等于0 |
| 1581 | 如果source恒等于SYSLOG_FROM_PROC则 |
| 1588 | 否则 |
| 1590 | idx等于syslog_idx |
| 1591 | time等于如果syslog_partial则syslog_time否则printk_time |
| 1602 | error减等于syslog_partial |
| 1604 | logbuf_unlock_irq() |
| 1605 | 退出 |
| 1607 | 当:type恒等于Return size of the log buffer |
| 1608 | error等于log_buf_len |
| 1609 | 退出 |
| 1610 | 默认 |
| 1615 | 返回:error |
| 名称 | 描述 |
|---|---|
| SYSCALL_DEFINE3 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |