1KSTRTOULL(9)               Basic C Library Functions              KSTRTOULL(9)
2
3
4

NAME

6       kstrtoull - convert a string to an unsigned long long
7

SYNOPSIS

9       int kstrtoull(const char * s, unsigned int base,
10                     unsigned long long * res);
11

ARGUMENTS

13       s
14           The start of the string. The string must be null-terminated, and
15           may also include a single newline before its terminating null. The
16           first character may also be a plus sign, but not a minus sign.
17
18       base
19           The number base to use. The maximum supported base is 16. If base
20           is given as 0, then the base of the string is automatically
21           detected with the conventional semantics - If it begins with 0x the
22           number will be parsed as a hexadecimal (case insensitive), if it
23           otherwise begins with 0, it will be parsed as an octal number.
24           Otherwise it will be parsed as a decimal.
25
26       res
27           Where to write the result of the conversion on success.
28

DESCRIPTION

30       Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing error.
31       Used as a replacement for the obsolete simple_strtoull. Return code
32       must be checked.
33
35Kernel Hackers Manual 3.10         June 2019                      KSTRTOULL(9)
Impressum