kstrtoint (9) - Linux Manuals
kstrtoint: convert a string to an int
kstrtoint - convert a string to an int
int kstrtoint(const char
* s, unsigned int base, int * res);
- The start of the string. The string must be null-terminated, and may also include a single newline before its terminating null. The first character may also be a plus sign or a minus sign.
- The number base to use. The maximum supported base is 16. If base is given as 0, then the base of the string is automatically detected with the conventional semantics - If it begins with 0x the number will be parsed as a hexadecimal (case insensitive), if it otherwise begins with 0, it will be parsed as an octal number. Otherwise it will be parsed as a decimal.
- Where to write the result of the conversion on success.