Root/
1 | /* |
2 | * Parsing command line, get the partitions information. |
3 | * |
4 | * Written by Cai Zhiyong <caizhiyong@huawei.com> |
5 | * |
6 | */ |
7 | #ifndef CMDLINEPARSEH |
8 | #define CMDLINEPARSEH |
9 | |
10 | #include <linux/blkdev.h> |
11 | |
12 | /* partition flags */ |
13 | #define PF_RDONLY 0x01 /* Device is read only */ |
14 | #define PF_POWERUP_LOCK 0x02 /* Always locked after reset */ |
15 | |
16 | struct cmdline_subpart { |
17 | char name[BDEVNAME_SIZE]; /* partition name, such as 'rootfs' */ |
18 | sector_t from; |
19 | sector_t size; |
20 | int flags; |
21 | struct cmdline_subpart *next_subpart; |
22 | }; |
23 | |
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; |
29 | }; |
30 | |
31 | void cmdline_parts_free(struct cmdline_parts **parts); |
32 | |
33 | int cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline); |
34 | |
35 | struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, |
36 | const char *bdev); |
37 | |
38 | void cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, |
39 | int slot, |
40 | int (*add_part)(int, struct cmdline_subpart *, void *), |
41 | void *param); |
42 | |
43 | #endif /* CMDLINEPARSEH */ |
44 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9