Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <linux/pagemap.h> |
| 2 | #include <linux/blkdev.h> |
| 3 | |
| 4 | /* |
| 5 | * add_gd_partition adds a partitions details to the devices partition |
| 6 | * description. |
| 7 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | struct parsed_partitions { |
| 9 | char name[BDEVNAME_SIZE]; |
| 10 | struct { |
| 11 | sector_t from; |
| 12 | sector_t size; |
| 13 | int flags; |
Tejun Heo | 689d6fa | 2008-08-25 19:56:16 +0900 | [diff] [blame] | 14 | } parts[DISK_MAX_PARTS]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | int next; |
| 16 | int limit; |
| 17 | }; |
| 18 | |
| 19 | static inline void |
| 20 | put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size) |
| 21 | { |
| 22 | if (n < p->limit) { |
| 23 | p->parts[n].from = from; |
| 24 | p->parts[n].size = size; |
| 25 | printk(" %s%d", p->name, n); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | extern int warn_no_part; |
| 30 | |