1BITMAP_PARSELIST(9) Basic Kernel Library Functions BITMAP_PARSELIST(9)
2
3
4
6 bitmap_parselist - convert list format ASCII string to bitmap
7
9 int bitmap_parselist(const char * bp, unsigned long * maskp,
10 int nmaskbits);
11
13 bp
14 read nul-terminated user string from this buffer
15
16 maskp
17 write resulting mask here
18
19 nmaskbits
20 number of bits in mask to be written
21
23 Input format is a comma-separated list of decimal numbers and ranges.
24 Consecutively set bits are shown as two hyphen-separated decimal
25 numbers, the smallest and largest bit numbers set in the range.
26
27 Returns 0 on success, -errno on invalid input strings.
28
30 -EINVAL: second number in range smaller than first -EINVAL: invalid
31 character in string -ERANGE: bit number specified too large for mask
32
34Kernel Hackers Manual 2.6. November 2011 BITMAP_PARSELIST(9)