Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
mtdcore.h File Reference

Go to the source code of this file.

Macros

#define mtd_for_each_device(mtd)
 

Functions

struct mtd_info__mtd_next_device (int i)
 
int add_mtd_device (struct mtd_info *mtd)
 
int del_mtd_device (struct mtd_info *mtd)
 
int add_mtd_partitions (struct mtd_info *, const struct mtd_partition *, int)
 
int del_mtd_partitions (struct mtd_info *)
 
int parse_mtd_partitions (struct mtd_info *master, const char **types, struct mtd_partition **pparts, struct mtd_part_parser_data *data)
 

Variables

struct mutex mtd_table_mutex
 

Macro Definition Documentation

#define mtd_for_each_device (   mtd)
Value:
for ((mtd) = __mtd_next_device(0); \
(mtd) != NULL; \
(mtd) = __mtd_next_device(mtd->index + 1))

Definition at line 22 of file mtdcore.h.

Function Documentation

struct mtd_info* __mtd_next_device ( int  i)
read

Definition at line 90 of file mtdcore.c.

int add_mtd_device ( struct mtd_info mtd)

add_mtd_device - register an MTD device : pointer to new MTD device info structure

Add a device to the list of MTD devices present in the system, and notify each currently active MTD 'user' of its arrival. Returns zero on success or 1 on failure, which currently will only happen if there is insufficient memory or a sysfs error.

Definition at line 330 of file mtdcore.c.

int add_mtd_partitions ( struct mtd_info ,
const struct mtd_partition ,
int   
)

Definition at line 625 of file mtdpart.c.

int del_mtd_device ( struct mtd_info mtd)

del_mtd_device - unregister an MTD device : pointer to MTD device info structure

Remove a device from the list of MTD devices present in the system, and notify each currently active MTD 'user' of its departure. Returns zero on success or 1 on failure, which currently will happen if the requested device does not appear to be present in the list.

Definition at line 437 of file mtdcore.c.

int del_mtd_partitions ( struct mtd_info )

Definition at line 321 of file mtdpart.c.

int parse_mtd_partitions ( struct mtd_info master,
const char **  types,
struct mtd_partition **  pparts,
struct mtd_part_parser_data data 
)

parse_mtd_partitions - parse MTD partitions : the master partition (describes whole MTD device) : names of partition parsers to try or NULL : array of partitions found is returned here : MTD partition parser-specific data

This function tries to find partition on MTD device . It uses MTD partition parsers, specified in . However, if is NULL, then the default list of parsers is used. The default list contains only the "cmdlinepart" and "ofpart" parsers ATM. Note: If there are more then one parser in , the kernel only takes the partitions parsed out by the first parser.

This function may return: o a negative error code in case of failure o zero if no partitions were found o a positive number of found partitions, in which case on exit will point to an array containing this number of &struct mtd_info objects.

Definition at line 723 of file mtdpart.c.

Variable Documentation

struct mutex mtd_table_mutex