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)
11 #include <linux/compiler.h>
13 #define KARMA_LABEL_MAGIC 0xAB56
15 int karma_partition(struct parsed_partitions *state)
33 struct d_partition *p;
35 data = read_part_sector(state, 0, §);
39 label = (struct disklabel *)data;
40 if (le16_to_cpu(label->d_magic) != KARMA_LABEL_MAGIC) {
45 p = label->d_partitions;
46 for (i = 0 ; i < 2; i++, p++) {
47 if (slot == state->limit)
50 if (p->p_fstype == 0x4d && le32_to_cpu(p->p_size)) {
51 put_partition(state, slot, le32_to_cpu(p->p_offset),
52 le32_to_cpu(p->p_size));
56 strlcat(state->pp_buf, "\n", PAGE_SIZE);