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

NAME

6       strict_strtoull - convert a string to an unsigned long long strictly
7

SYNOPSIS

9       int strict_strtoull(const char * cp, unsigned int base,
10                           unsigned long long * res);
11

ARGUMENTS

13       cp
14           The string to be converted
15
16       base
17           The number base to use
18
19       res
20           The converted result value
21

DESCRIPTION

23       strict_strtoull converts a string to an unsigned long long only if the
24       string is really an unsigned long long string, any string containing
25       any invalid char at the tail will be rejected and -EINVAL is returned,
26       only a newline char at the tail is acceptible because people generally
27

CHANGE A MODULE PARAMETER IN THE FOLLOWING WAY

29       echo 1024 > /sys/module/e1000/parameters/copybreak
30
31       echo will append a newline to the tail of the string.
32
33       It returns 0 if conversion is successful and *res is set to the
34       converted value, otherwise it returns -EINVAL and *res is set to 0.
35
36       simple_strtoull just ignores the successive invalid characters and
37       return the converted value of prefix part of the string.
38
40Kernel Hackers Manual 2.6.         June 2019                STRICT_STRTOULL(9)
Impressum