1__BITMAP_PARSELIST(9)   Basic Kernel Library Functions   __BITMAP_PARSELIST(9)
2
3
4

NAME

6       __bitmap_parselist - convert list format ASCII string to bitmap
7

SYNOPSIS

9       int __bitmap_parselist(const char * buf, unsigned int buflen,
10                              int is_user, unsigned long * maskp,
11                              int nmaskbits);
12

ARGUMENTS

14       buf
15           read nul-terminated user string from this buffer
16
17       buflen
18           buffer size in bytes. If string is smaller than this then it must
19           be terminated with a \0.
20
21       is_user
22           location of buffer, 0 indicates kernel space
23
24       maskp
25           write resulting mask here
26
27       nmaskbits
28           number of bits in mask to be written
29

DESCRIPTION

31       Input format is a comma-separated list of decimal numbers and ranges.
32       Consecutively set bits are shown as two hyphen-separated decimal
33       numbers, the smallest and largest bit numbers set in the range.
34
35       Returns 0 on success, -errno on invalid input strings.
36

ERROR VALUES

38       -EINVAL: second number in range smaller than first -EINVAL: invalid
39       character in string -ERANGE: bit number specified too large for mask
40
42Kernel Hackers Manual 3.10         June 2019             __BITMAP_PARSELIST(9)
Impressum