函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-27 12:44:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kdb_set - This function implements the 'set' command. Alter an* existing environment variable or create a new one.

函数原型:int kdb_set(int argc, const char **argv)

返回类型:int

参数:

类型参数名称
intargc
const char **argv
394  如果argc恒等于3则
395  argv[2]等于argv[3]
396  argc自减
399  如果argc不等于2则返回:KDB_ARGCOUNT
405  如果字符串比较恒等于0则
409  debugflags等于转换字符串为无符号整形
410  如果cp恒等于argv[2]或debugflags按位与All debug flags 的反则
411  kdb_printf("kdb: illegal debug flags '%s'\n", argv[2])
413  返回:0
415  Kernel debugger state flags等于Kernel debugger state flags按位与All debug flags 左移Shift factor for dbflags 位的值的反按位或debugflags左移Shift factor for dbflags
419  返回:0
426  varlen等于strlen - Find the length of a string*@s: The string to be sized
427  vallen等于strlen - Find the length of a string*@s: The string to be sized
428  ep等于kdballocenv - This function is used to allocate bytes for* environment entries.* Parameters:* match A character string representing a numeric value* Outputs:* *value the unsigned long representation of the env variable 'match'* Returns:
429  如果ep恒等于0则返回:KDB_ENVBUFFULL
432  输出格式化串
434  ep[varlen + vallen + 1]等于'\0'
436 i小于__nenv循环
437  如果Initial environment[i]且字符串指定长度比较恒等于0且Initial environment[i][varlen]恒等于'\0'或Initial environment[i][varlen]恒等于'='的值则
441  Initial environment[i]等于ep
442  返回:0
449 i小于__nenv减1循环
450  如果Initial environment[i]恒等于0则
451  Initial environment[i]等于ep
452  返回:0
456  返回:KDB_ENVFULL
调用者
名称描述
kdb_dmesgkdb_dmesg - This function implements the 'dmesg' command to display* the contents of the syslog buffer.* dmesg [lines] [adjust]