'\" t .\" Title: __bitmap_parselist .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Basic Kernel Library Functions .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "__BITMAP_PARSELIST" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Basic Kernel Library Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" __bitmap_parselist \- convert list format ASCII string to bitmap .SH "SYNOPSIS" .HP \w'int\ __bitmap_parselist('u .BI "int __bitmap_parselist(const\ char\ *\ " "buf" ", unsigned\ int\ " "buflen" ", int\ " "is_user" ", unsigned\ long\ *\ " "maskp" ", int\ " "nmaskbits" ");" .SH "ARGUMENTS" .PP \fIbuf\fR .RS 4 read nul\-terminated user string from this buffer .RE .PP \fIbuflen\fR .RS 4 buffer size in bytes\&. If string is smaller than this then it must be terminated with a \e0\&. .RE .PP \fIis_user\fR .RS 4 location of buffer, 0 indicates kernel space .RE .PP \fImaskp\fR .RS 4 write resulting mask here .RE .PP \fInmaskbits\fR .RS 4 number of bits in mask to be written .RE .SH "DESCRIPTION" .PP 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\&. .PP Returns 0 on success, \-errno on invalid input strings\&. Error values: \fB\-EINVAL\fR: second number in range smaller than first \fB\-EINVAL\fR: invalid character in string \fB\-ERANGE\fR: bit number specified too large for mask .SH "COPYRIGHT" .br