Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:If a hyphen was found in get_option, this will handle the* range of numbers, M-N. This will expand the range and insert* the values[M, M+1, ..., N] into the ints array in get_options.

Proto:static int get_range(char **str, int *pint, int n)

Type:int

Parameter:

TypeParameterName
char **str
int *pint
intn
27  str++
28  upper_range = 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.
29  inc_counter = upper_range - pint
30  When n && x < upper_range cycle pint++ = x
32  Return inc_counter
Caller
NameDescribe
get_optionsget_options - Parse a string into a list of integers*@str: String to be parsed*@nints: size of integer array*@ints: integer array* This function parses a string containing a comma-separated* list of integers, a hyphen-separated range of _positive_