Blame view
include/linux/cmdline-parser.h
1.17 KB
bab55417b block: support em... |
1 2 3 4 5 6 7 8 9 10 |
/* * Parsing command line, get the partitions information. * * Written by Cai Zhiyong <caizhiyong@huawei.com> * */ #ifndef CMDLINEPARSEH #define CMDLINEPARSEH #include <linux/blkdev.h> |
8d3ef556a cmdline-parser: f... |
11 12 |
#include <linux/fs.h> #include <linux/slab.h> |
bab55417b block: support em... |
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
/* partition flags */ #define PF_RDONLY 0x01 /* Device is read only */ #define PF_POWERUP_LOCK 0x02 /* Always locked after reset */ struct cmdline_subpart { char name[BDEVNAME_SIZE]; /* partition name, such as 'rootfs' */ sector_t from; sector_t size; int flags; struct cmdline_subpart *next_subpart; }; struct cmdline_parts { char name[BDEVNAME_SIZE]; /* block device, such as 'mmcblk0' */ unsigned int nr_subparts; struct cmdline_subpart *subpart; struct cmdline_parts *next_parts; }; void cmdline_parts_free(struct cmdline_parts **parts); int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline); struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, const char *bdev); |
bca266b38 block: remove unr... |
39 40 41 42 |
int cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, int slot, int (*add_part)(int, struct cmdline_subpart *, void *), void *param); |
bab55417b block: support em... |
43 44 |
#endif /* CMDLINEPARSEH */ |