Linux Kernel
3.7.1
|
#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) |
char * | get_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) | |
EXPORT_SYMBOL | ( | memparse | ) |
EXPORT_SYMBOL | ( | get_option | ) |
EXPORT_SYMBOL | ( | get_options | ) |
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
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).
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.