Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/kmod.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/err.h>
#include "mtdcore.h"
Go to the source code of this file.
Data Structures | |
struct | mtd_part |
Macros | |
#define | PART(x) ((struct mtd_part *)(x)) |
#define | put_partition_parser(p) do { module_put((p)->owner); } while (0) |
Functions | |
void | mtd_erase_callback (struct erase_info *instr) |
EXPORT_SYMBOL_GPL (mtd_erase_callback) | |
int | del_mtd_partitions (struct mtd_info *master) |
int | mtd_add_partition (struct mtd_info *master, char *name, long long offset, long long length) |
EXPORT_SYMBOL_GPL (mtd_add_partition) | |
int | mtd_del_partition (struct mtd_info *master, int partno) |
EXPORT_SYMBOL_GPL (mtd_del_partition) | |
int | add_mtd_partitions (struct mtd_info *master, const struct mtd_partition *parts, int nbparts) |
int | register_mtd_parser (struct mtd_part_parser *p) |
EXPORT_SYMBOL_GPL (register_mtd_parser) | |
int | deregister_mtd_parser (struct mtd_part_parser *p) |
EXPORT_SYMBOL_GPL (deregister_mtd_parser) | |
int | parse_mtd_partitions (struct mtd_info *master, const char **types, struct mtd_partition **pparts, struct mtd_part_parser_data *data) |
int | mtd_is_partition (const struct mtd_info *mtd) |
EXPORT_SYMBOL_GPL (mtd_is_partition) | |
uint64_t | mtd_get_device_size (const struct mtd_info *mtd) |
EXPORT_SYMBOL_GPL (mtd_get_device_size) | |
int deregister_mtd_parser | ( | struct mtd_part_parser * | p | ) |
EXPORT_SYMBOL_GPL | ( | mtd_erase_callback | ) |
EXPORT_SYMBOL_GPL | ( | mtd_add_partition | ) |
EXPORT_SYMBOL_GPL | ( | mtd_del_partition | ) |
EXPORT_SYMBOL_GPL | ( | register_mtd_parser | ) |
EXPORT_SYMBOL_GPL | ( | deregister_mtd_parser | ) |
EXPORT_SYMBOL_GPL | ( | mtd_is_partition | ) |
EXPORT_SYMBOL_GPL | ( | mtd_get_device_size | ) |
void mtd_erase_callback | ( | struct erase_info * | instr | ) |
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.
int register_mtd_parser | ( | struct mtd_part_parser * | p | ) |