Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Convert non-negative integer string representation in explicitly given radix* to an integer.* Return number of characters consumed maybe or-ed with overflow bit.* If overflow occurs, result integer (incorrect) is still returned.

Proto:unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *p)

Type:unsigned int

Parameter:

TypeParameterName
const char *s
unsigned intbase
unsigned long long *p
53  res = 0
54  rv = 0
55  When 1 cycle
56  c = s
57  lc = c | 0x20
60  If '0' <= c && c <= '9' Then val = c - '0'
62  Else if 'a' <= lc && lc <= 'f' Then val = lc - 'a' + 10
64  Else Break
67  If val >= base Then Break
77  res = res * base + val
78  rv++
79  s++
81  p = res
82  Return rv
Caller
NameDescribe
simple_strtoullsimple_strtoull - convert a string to an unsigned long 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 kstrtoull instead.
bitmap_getnum