table of contents
__BITMAP_PARSE(9) | Basic Kernel Library Functions | __BITMAP_PARSE(9) |
NAME¶
__bitmap_parse - convert an ASCII hex string into a bitmap.
SYNOPSIS¶
int __bitmap_parse(const char * buf, unsigned int buflen, int is_user, unsigned long * maskp, int nmaskbits);
ARGUMENTS¶
const char * buf
unsigned int buflen
int is_user
unsigned long * maskp
int nmaskbits
DESCRIPTION¶
Commas group hex digits into chunks. Each chunk defines exactly 32 bits of the resultant bitmask. No chunk may specify a value larger than 32 bits (-EOVERFLOW), and if a chunk specifies a smaller value then leading 0-bits are prepended. -EINVAL is returned for illegal characters and for grouping errors such as “1,,5”, “,44”, “,” and "". Leading and trailing whitespace accepted, but not embedded whitespace.
COPYRIGHT¶
June 2017 | Kernel Hackers Manual 4.11 |