Linux Kernel
3.7.1
|
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 |
#define mtd_for_each_device | ( | 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.
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.
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.