Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\globtest.c Create Date:2022-07-28 07:18:03
Last Modify:2022-05-21 14:41:25 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test

Proto:static bool test(char const *pat, char const *str, bool expected)

Type:bool

Parameter:

TypeParameterName
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  If Not success Then message = msg_error
35  Else if Boot with "glob.verbose=1" to show successful tests, too Then message = msg_ok
37  Else Return success
40  printk(message, pat, str, mismatch + 3 * match)
41  Return success
Caller
NameDescribe
glob_init