1 // SPDX-License-Identifier: GPL-2.0
3 * fs/partitions/karma.c
4 * Rio Karma partition info.
6 * Copyright (C) 2006 Bob Copeland (me@bobcopeland.com)
12 #include <linux/compiler.h>
14 int karma_partition(struct parsed_partitions
*state
)
32 struct d_partition
*p
;
34 data
= read_part_sector(state
, 0, §
);
38 label
= (struct disklabel
*)data
;
39 if (le16_to_cpu(label
->d_magic
) != KARMA_LABEL_MAGIC
) {
44 p
= label
->d_partitions
;
45 for (i
= 0 ; i
< 2; i
++, p
++) {
46 if (slot
== state
->limit
)
49 if (p
->p_fstype
== 0x4d && le32_to_cpu(p
->p_size
)) {
50 put_partition(state
, slot
, le32_to_cpu(p
->p_offset
),
51 le32_to_cpu(p
->p_size
));
55 strlcat(state
->pp_buf
, "\n", PAGE_SIZE
);