2 * fs/partitions/ultrix.c
4 * Code extracted from drivers/block/genhd.c
6 * Re-organised Jul 1999 Russell King
11 int ultrix_partition(struct parsed_partitions
*state
, struct block_device
*bdev
)
16 struct ultrix_disklabel
{
17 s32 pt_magic
; /* magic no. indicating part. info exits */
18 s32 pt_valid
; /* set by driver if pt is current */
20 s32 pi_nblocks
; /* no. of sectors */
21 u32 pi_blkoff
; /* block offset for start */
25 #define PT_MAGIC 0x032957 /* Partition magic number */
26 #define PT_VALID 1 /* Indicates if struct is valid */
28 data
= read_dev_sector(bdev
, (16384 - sizeof(*label
))/512, §
);
32 label
= (struct ultrix_disklabel
*)(data
+ 512 - sizeof(*label
));
34 if (label
->pt_magic
== PT_MAGIC
&& label
->pt_valid
== PT_VALID
) {
36 if (label
->pt_part
[i
].pi_nblocks
)
37 put_partition(state
, i
+1,
38 label
->pt_part
[i
].pi_blkoff
,
39 label
->pt_part
[i
].pi_nblocks
);