kernels/linux-2.4.0/fs/partitions/msdos.c
/* james@bpgc.com: Solaris has a nasty indicator: 0x82 which also
   indicates linux swap.  Be careful before believing this is Solaris. */
james@bpgc.com: Solaris has a nasty indicator: 0x82 which also
indicates linux swap.  Be careful before believing this is Solaris.
james@bpgc . com : Solaris has a nasty indicator : 0x82 which also indicates linux swap . Be careful before believing this is Solaris .
static void
solaris_x86_partition(struct gendisk *hd, int minor) {
	long offset = hd->part[minor].start_sect;
	struct buffer_head *bh;
	struct solaris_x86_vtoc *v;
	struct solaris_x86_slice *s;
	int i;
	char buf[40];
	if(!(bh = get_partition_table_block(hd, minor, 0)))
		return;
	v = (struct solaris_x86_vtoc *)(bh->b_data + 512);
	if(v->v_sanity != SOLARIS_X86_VTOC_SANE) {
		brelse(bh);
		return;
	}
	printk(" %s: <solaris:", disk_name(hd, minor, buf));
	if(v->v_version != 1) {
		printk("  cannot handle version %ld vtoc>\n", v->v_version);
		brelse(bh);
		return;
	}
	for(i=0; i<SOLARIS_X86_NUMSLICE; i++) {
		s = &v->v_slice[i];
		if (s->s_size == 0)
			continue;
		printk(" [s%d]", i);
		add_gd_partition(hd, current_minor, s->s_start+offset, s->s_size);
		current_minor++;
	}
	brelse(bh);
	printk(" >\n");
}
static void solaris_x86_partition ( struct gendisk * hd , int minor ) { long offset = hd -> part [ minor ] . start_sect ; struct buffer_head * bh ; struct solaris_x86_vtoc * v ; struct solaris_x86_slice * s ; int i ; char buf [ 40 ] ; if ( ! ( bh = get_partition_table_block ( hd , minor , 0 ) ) ) return ; v = ( struct solaris_x86_vtoc * ) ( bh -> b_data + 512 ) ; if ( v -> v_sanity != SOLARIS_X86_VTOC_SANE ) { brelse ( bh ) ; return ; } printk ( " " , disk_name ( hd , minor , buf ) ) ; if ( v -> v_version != 1 ) { printk ( " \n " , v -> v_version ) ; brelse ( bh ) ; return ; } for ( i = 0 ; i < SOLARIS_X86_NUMSLICE ; i ++ ) { s = & v -> v_slice [ i ] ; if ( s -> s_size == 0 ) continue ; printk ( " " , i ) ; add_gd_partition ( hd , current_minor , s -> s_start + offset , s -> s_size ) ; current_minor ++ ; } brelse ( bh ) ; printk ( " \n " ) ; }
james@bpgc.com: Solaris has a nasty indicator: 0x82 which also
indicates linux swap.
james@bpgc . com : Solaris has a nasty indicator : 0x82 which also indicates linux swap .
/* solaris partitions are relative to current MS-DOS
		 * one but add_gd_partition starts relative to sector
		 * zero of the disk.  Therefore, must add the offset
		 * of the current partition */