2 * Parsing command line, get the partitions information.
4 * Written by Cai Zhiyong <caizhiyong@huawei.com>
10 #include <linux/blkdev.h>
13 #define PF_RDONLY 0x01 /* Device is read only */
14 #define PF_POWERUP_LOCK 0x02 /* Always locked after reset */
16 struct cmdline_subpart
{
17 char name
[BDEVNAME_SIZE
]; /* partition name, such as 'rootfs' */
21 struct cmdline_subpart
*next_subpart
;
24 struct cmdline_parts
{
25 char name
[BDEVNAME_SIZE
]; /* block device, such as 'mmcblk0' */
26 unsigned int nr_subparts
;
27 struct cmdline_subpart
*subpart
;
28 struct cmdline_parts
*next_parts
;
31 void cmdline_parts_free(struct cmdline_parts
**parts
);
33 int cmdline_parts_parse(struct cmdline_parts
**parts
, const char *cmdline
);
35 struct cmdline_parts
*cmdline_parts_find(struct cmdline_parts
*parts
,
38 void cmdline_parts_set(struct cmdline_parts
*parts
, sector_t disk_size
,
40 int (*add_part
)(int, struct cmdline_subpart
*, void *),
43 #endif /* CMDLINEPARSEH */
This page took 0.033921 seconds and 5 git commands to generate.