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

Go to the source code of this file.

Functions

int get_option (char **str, int *pint)
 
charget_options (const char *str, int nints, int *ints)
 
unsigned long long memparse (const char *ptr, char **retptr)
 
 EXPORT_SYMBOL (memparse)
 
 EXPORT_SYMBOL (get_option)
 
 EXPORT_SYMBOL (get_options)
 

Function Documentation

EXPORT_SYMBOL ( memparse  )
EXPORT_SYMBOL ( get_option  )
EXPORT_SYMBOL ( get_options  )
int get_option ( char **  str,
int pint 
)

get_option - Parse integer from an option string : option string : (output) integer value parsed from

Read an int from an option string; if available accept a subsequent comma as well.

Return values: 0 - no int in string 1 - int found, no subsequent comma 2 - int found including a subsequent comma 3 - hyphen found to denote a range

Definition at line 52 of file cmdline.c.

char* get_options ( const char str,
int  nints,
int ints 
)

get_options - Parse a string into a list of integers : String to be parsed : size of integer array : integer array

This function parses a string containing a comma-separated list of integers, a hyphen-separated range of positive integers, or a combination of both. The parse halts when the array is full, or when no more numbers can be retrieved from the string.

Return value is the character in the string which caused the parse to end (typically a null terminator, if is completely parseable).

Definition at line 88 of file cmdline.c.

unsigned long long memparse ( const char ptr,
char **  retptr 
)

memparse - parse a string with mem suffixes into a number : Where parse begins : (output) Optional pointer to next char after parse completes

Parses a string into a number. The number stored at is potentially suffixed with K (for kilobytes, or 1024 bytes), M (for megabytes, or 1048576 bytes), or G (for gigabytes, or 1073741824). If the number is suffixed with K, M, or G, then the return value is the number multiplied by one kilobyte, one megabyte, or one gigabyte, respectively.

Definition at line 129 of file cmdline.c.