__bitmap_parselist — convert list format ASCII string to bitmap
int __bitmap_parselist ( | const char * buf, |
| unsigned int buflen, | |
| int is_user, | |
| unsigned long * maskp, | |
int nmaskbits); |
bufread nul-terminated user string from this buffer
buflenbuffer size in bytes. If string is smaller than this then it must be terminated with a \0.
is_userlocation of buffer, 0 indicates kernel space
maskpwrite resulting mask here
nmaskbitsnumber of bits in mask to be written
Input format is a comma-separated list of decimal numbers and ranges. Consecutively set bits are shown as two hyphen-separated decimal numbers, the smallest and largest bit numbers set in the range.
Returns 0 on success, -errno on invalid input strings.
Error values:
-EINVAL: second number in range smaller than first
-EINVAL: invalid character in string
-ERANGE: bit number specified too large for mask