sysv68).
Otherwise, say N.
+config X68K_PARTITION
+ bool "X68000 partition support" if PARTITION_ADVANCED
+ default y if X68000
+ help
+ Support hard disks partitioned under X68000.
+
config CMDLINE_PARTITION
bool "Command line partition support" if PARTITION_ADVANCED
select BLK_CMDLINE_PARSER
obj-$(CONFIG_EFI_PARTITION) += efi.o
obj-$(CONFIG_KARMA_PARTITION) += karma.o
obj-$(CONFIG_SYSV68_PARTITION) += sysv68.o
+obj-$(CONFIG_X68K_PARTITION) += x68k.o
#include "efi.h"
#include "karma.h"
#include "sysv68.h"
+#include "x68k.h"
#include "cmdline.h"
int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/
#ifdef CONFIG_SYSV68_PARTITION
sysv68_partition,
#endif
+#ifdef CONFIG_X68K_PARTITION
+ x68k_partition,
+#endif
NULL
};
--- /dev/null
+/*
+ * fs/partitions/x68k.c
+ */
+
+#include <linux/ctype.h>
+#include "check.h"
+#include "x68k.h"
+
+int x68k_partition(struct parsed_partitions *state)
+{
+ Sector sect;
+ struct x68k_rootsector *rs;
+ struct x68k_partition_info *pi;
+ int slot;
+
+ rs = read_part_sector(state, 4, §);
+ if (!rs)
+ return -1;
+
+ if (memcmp(rs->head.sig, "X68K", 4)) {
+ put_dev_sector(sect);
+ return 0;
+ }
+
+ pi = &rs->partition[0];
+ for (slot = 1; slot < 16; slot++, pi++) {
+ if (pi->start >= 0x01000000 || !pi->start)
+ continue;
+ put_partition(state, slot,
+ be32_to_cpu(pi->start) * 2,
+ be32_to_cpu(pi->length) * 2);
+ }
+ strlcat(state->pp_buf, "\n", PAGE_SIZE);
+
+ return 1;
+}
--- /dev/null
+/*
+ * fs/partitions/x68k.h
+ */
+
+#include <linux/compiler.h>
+
+struct x68k_drive_info
+{
+ char sig[4];
+ __be32 max;
+ __be32 alt;
+ __be32 shipping;
+};
+
+struct x68k_partition_info
+{
+ char system[8];
+ __be32 start;
+ __be32 length;
+};
+
+struct x68k_rootsector
+{
+ struct x68k_drive_info head;
+ struct x68k_partition_info partition[15];
+} __packed;
+
+int x68k_partition(struct parsed_partitions *state);