Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\rdma.c Create Date:2022-07-28 11:15:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:parse_resource

Proto:static int parse_resource(char *c, int *intval)

Type:int

Parameter:

TypeParameterName
char *c
int *intval
359  value = c
363  name = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function
364  If Not name || Not value Then Return -EINVAL
367  i = match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
368  If i < 0 Then Return i
371  len = strlen - Find the length of a string*@s: The string to be sized
373  from = value
374  to = value + len
376  ret = match_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
377  If ret >= 0 Then
378  If intval < 0 Then Return -EINVAL
380  Return i
382  If strncmp(value, RDMACG_MAX_STR, len) == 0 Then
383  intval = S32_MAX
384  Return i
386  Return -EINVAL
Caller
NameDescribe
rdmacg_parse_limits