| 函数逻辑报告 | 
| Source Code: kernel\bpf\core.c | Create Date:2022-07-27 14:02:18 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:bpf_prog_array_copy
函数原型:int bpf_prog_array_copy(struct bpf_prog_array *old_array, struct bpf_prog *exclude_prog, struct bpf_prog *include_prog, struct bpf_prog_array **new_array)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct bpf_prog_array * | old_array | |
| struct bpf_prog * | exclude_prog | |
| struct bpf_prog * | include_prog | |
| struct bpf_prog_array ** | new_array | 
| 1960 | carry_prog_cnt等于0 | 
| 1963 | bool found_exclude = false | 
| 1964 | new_prog_idx等于0 | 
| 1969 | 如果old_array则 | 
| 1972 | 如果prog恒等于exclude_prog则 | 
| 1973 | found_exclude = true | 
| 1974 | 继续下一循环 | 
| 1976 | 如果prog不等于prog则carry_prog_cnt自加 | 
| 1978 | 如果prog恒等于include_prog则返回:负EEXIST | 
| 1983 | 如果exclude_prog且非found_exclude则返回:负ENOENT | 
| 1987 | new_prog_cnt等于carry_prog_cnt | 
| 1988 | 如果include_prog则new_prog_cnt加等于1 | 
| 1992 | 如果非new_prog_cnt则 | 
| 1993 | * new_array = NULL | 
| 1994 | 返回:0 | 
| 1998 | array等于bpf_prog_array_alloc(new_prog_cnt + 1, GFP_KERNEL) | 
| 2003 | 如果carry_prog_cnt则 | 
| 2012 | 如果include_prog则prog等于include_prog | 
| 2014 | prog = NULL | 
| 2016 | 返回:0 | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |