2 * fs/partitions/karma.c
3 * Rio Karma partition info.
5 * Copyright (C) 2006 Bob Copeland (me@bobcopeland.com)
11 #include <linux/compiler.h>
13 int karma_partition(struct parsed_partitions
*state
)
31 struct d_partition
*p
;
33 data
= read_part_sector(state
, 0, §
);
37 label
= (struct disklabel
*)data
;
38 if (le16_to_cpu(label
->d_magic
) != KARMA_LABEL_MAGIC
) {
43 p
= label
->d_partitions
;
44 for (i
= 0 ; i
< 2; i
++, p
++) {
45 if (slot
== state
->limit
)
48 if (p
->p_fstype
== 0x4d && le32_to_cpu(p
->p_size
)) {
49 put_partition(state
, slot
, le32_to_cpu(p
->p_offset
),
50 le32_to_cpu(p
->p_size
));
54 strlcat(state
->pp_buf
, "\n", PAGE_SIZE
);