Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\parser.c Create Date:2022-07-28 06:19:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:match_number: scan a number in the given base from a substring_t*@s: substring to be scanned*@result: resulting integer on success*@base: base to use when converting string* Description: Given a &substring_t and a base, attempts to parse the substring

Proto:static int match_number(substring_t *s, int *result, int base)

Type:int

Parameter:

TypeParameterName
substring_t *s
int *result
intbase
133  buf = match_strdup(s)
134  If Not buf Then Return -ENOMEM
137  ret = 0
138  val = simple_strtol - convert a string to a signed long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtol instead.
139  If endp == buf Then ret = -EINVAL
141  Else if val < INT_MIN || val > INT_MAX Then ret = -ERANGE
143  Else result = val
145  kfree(buf)
146  Return ret
Caller
NameDescribe
match_intmatch_int: - scan a decimal representation of an integer from a substring_t*@s: substring_t to be scanned*@result: resulting integer on success* Description: Attempts to parse the &substring_t @s as a decimal integer. On
match_octalmatch_octal: - scan an octal representation of an integer from a substring_t*@s: substring_t to be scanned*@result: resulting integer on success* Description: Attempts to parse the &substring_t @s as an octal integer
match_hexmatch_hex: - scan a hex representation of an integer from a substring_t*@s: substring_t to be scanned*@result: resulting integer on success* Description: Attempts to parse the &substring_t @s as a hexadecimal integer