函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\globtest.c Create Date:2022-07-27 08:16:36
Last Modify:2022-05-21 14:41:25 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:test

函数原型:static bool test(char const *pat, char const *str, bool expected)

返回类型:bool

参数:

类型参数名称
char const *pat
char const *str
boolexpected
22  match等于glob_match - Shell-style pattern matching, like !fnmatch(pat, str, 0)*@pat: Shell-style pattern to match, e.g. "*.[ch]".*@str: String to match. The pattern must match the entire string.* Perform shell-style glob matching, returning true (1) if the match
23  success等于match恒等于expected
26  static char const msg_error[] __initconst = r conditions  "glob: \"%s\" vs. \"%s\": %s *** ERROR ***\n"
28  static char const msg_ok[] __initconst = debug-level messages  "glob: \"%s\" vs. \"%s\": %s OK\n"
30  static char const mismatch[] __initconst = "mismatch"
33  如果非successmessage等于msg_error
35  否则如果Boot with "glob.verbose=1" to show successful tests, too message等于msg_ok
37  否则返回:success
40  printk(message, pat, str, mismatch + 3 * match)
41  返回:success
调用者
名称描述
glob_init