2 * fs/partitions/karma.c
3 * Rio Karma partition info.
5 * Copyright (C) 2006 Bob Copeland (me@bobcopeland.com)
12 int karma_partition(struct parsed_partitions
*state
, struct block_device
*bdev
)
29 } __attribute__((packed
)) *label
;
30 struct d_partition
*p
;
32 data
= read_dev_sector(bdev
, 0, §
);
36 label
= (struct disklabel
*)data
;
37 if (le16_to_cpu(label
->d_magic
) != KARMA_LABEL_MAGIC
) {
42 p
= label
->d_partitions
;
43 for (i
= 0 ; i
< 2; i
++, p
++) {
44 if (slot
== state
->limit
)
47 if (p
->p_fstype
== 0x4d && le32_to_cpu(p
->p_size
)) {
48 put_partition(state
, slot
, le32_to_cpu(p
->p_offset
),
49 le32_to_cpu(p
->p_size
));