.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SMB_GETOPT" "" "06 October 2005" "" "" .SH NAME smb_getopt \- option parser .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int smb_getopt (char * \fIcaller\fB, char ** \fIoptions\fB, struct option * \fIopts\fB, char ** \fIoptopt\fB, char ** \fIoptarg\fB, unsigned long * \fIflag\fB, unsigned long * \fIvalue\fB); \fR .SH "ARGUMENTS" .TP \fB\fIcaller\fB\fR name of the caller, for error messages .TP \fB\fIoptions\fB\fR the options string .TP \fB\fIopts\fB\fR an array of &struct option entries controlling parser operations .TP \fB\fIoptopt\fB\fR output; will contain the current option .TP \fB\fIoptarg\fB\fR output; will contain the value (if one exists) .TP \fB\fIflag\fB\fR output; may be NULL; should point to a long for or'ing flags .TP \fB\fIvalue\fB\fR output; may be NULL; will be overwritten with the integer value of the current argument. .SH "DESCRIPTION" .PP Helper to parse options on the format used by mount (``a=b,c=d,e,f''). Returns opts->val if a matching entry in the 'opts' array is found, 0 when no more tokens are found, -1 if an error is encountered.