Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\util.c Create Date:2022-07-28 19:47:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_parse_ulong - Parse an "unsigned long" value.*@result: Pointer to "unsigned long".*@str: Pointer to string to parse.* Returns one of values in "enum tomoyo_value_type".* The @src is updated to point the first character after the value* on success.

Proto:u8 tomoyo_parse_ulong(unsigned long *result, char **str)

Type:u8

Parameter:

TypeParameterName
unsigned long *result
char **str
185  cp = str
187  base = 10
189  If cp == '0' Then
190  c = *(cp + 1)
192  If c == 'x' || c == 'X' Then
193  base = 16
194  cp += 2
195  Else if c >= '0' && c <= '7' Then
196  base = 8
197  cp++
200  result = simple_strtoul - convert a string to an unsigned 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 kstrtoul instead.
201  If cp == ep Then Return TOMOYO_VALUE_TYPE_INVALID
203  str = ep
205  Case base == 16
206  Return TOMOYO_VALUE_TYPE_HEXADECIMAL
207  Case base == 8
208  Return TOMOYO_VALUE_TYPE_OCTAL
209  Default
210  Return TOMOYO_VALUE_TYPE_DECIMAL
Caller
NameDescribe
tomoyo_parse_number_unionmoyo_parse_number_union - Parse a tomoyo_number_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_number_union".* Returns true on success, false otherwise.