2 * fs/partitions/sysv68.c
4 * Copyright (C) 2007 Philippe De Muyter <phdm@macqel.be>
11 * Volume ID structure: on first 256-bytes sector of disk
16 u8 vid_mac[8]; /* ASCII string "MOTOROLA" */
20 * config block: second 256-bytes sector on disk
25 __be32 ios_slcblk; /* Slice table block number */
26 __be16 ios_slccnt; /* Number of entries in slice table */
31 * combined volumeid and dkconfig block
35 struct volumeid dk_vid;
36 struct dkconfig dk_ios;
40 * Slice Table Structure
44 __be32 nblocks; /* slice size (in blocks) */
45 __be32 blkoff; /* block offset of slice */
49 int sysv68_partition(struct parsed_partitions *state)
58 data = read_part_sector(state, 0, §);
62 b = (struct dkblk0 *)data;
63 if (memcmp(b->dk_vid.vid_mac, "MOTOROLA", sizeof(b->dk_vid.vid_mac))) {
67 slices = be16_to_cpu(b->dk_ios.ios_slccnt);
68 i = be32_to_cpu(b->dk_ios.ios_slcblk);
71 data = read_part_sector(state, i, §);
75 slices -= 1; /* last slice is the whole disk */
76 printk("sysV68: %s(s%u)", state->name, slices);
77 slice = (struct slice *)data;
78 for (i = 0; i < slices; i++, slice++) {
79 if (slot == state->limit)
81 if (be32_to_cpu(slice->nblocks)) {
82 put_partition(state, slot,
83 be32_to_cpu(slice->blkoff),
84 be32_to_cpu(slice->nblocks));