__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) ; |
buf
read nul-terminated user string from this buffer
buflen
buffer size in bytes. If string is smaller than this then it must be terminated with a \0.
is_user
location of buffer, 0 indicates kernel space
maskp
write resulting mask here
nmaskbits
number 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. Optionally each range can be postfixed to denote that only parts of it should be set. The range will divided to groups of specific size. From each group will be used only defined amount of bits. Syntax: range:used_size/group_size