Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
getopt.c File Reference
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/errno.h>
#include "getopt.h"

Go to the source code of this file.

Functions

int ncp_getopt (const char *caller, char **options, const struct ncp_option *opts, char **optopt, char **optarg, unsigned long *value)
 

Function Documentation

int ncp_getopt ( const char caller,
char **  options,
const struct ncp_option opts,
char **  optopt,
char **  optarg,
unsigned long value 
)

ncp_getopt - option parser : name of the caller, for error messages : the options string : an array of &struct option entries controlling parser operations : output; will contain the current option : output; will contain the value (if one exists) : output; may be NULL; will be overwritten with the integer value of the current argument.

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.

Definition at line 26 of file getopt.c.