change MAXPARTITIONS to 16.

This commit is contained in:
shin 2002-03-23 03:14:54 +00:00
parent 110e2a57ff
commit f8fe1d3f46
3 changed files with 41 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.33 2002/03/16 17:03:32 martin Exp $
# $NetBSD: MAKEDEV,v 1.34 2002/03/23 03:15:39 shin Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -106,6 +106,8 @@ dialin=0
dialout=524288 # high bit of the minor number
callunit=262144
highpartoffset=524280 # offset for partition 9 to 16
PATH=/sbin:/usr/sbin:/bin:/usr/bin
umask 77
@ -381,6 +383,14 @@ ccd*|fd*|sd*|vnd*|wd*|raid*)
mknod ${name}${unit}f b $blk $(($unit * 8 + 5))
mknod ${name}${unit}g b $blk $(($unit * 8 + 6))
mknod ${name}${unit}h b $blk $(($unit * 8 + 7))
mknod ${name}${unit}i b $blk $(($unit * 8 + $highpartoffset + 8))
mknod ${name}${unit}j b $blk $(($unit * 8 + $highpartoffset + 9))
mknod ${name}${unit}k b $blk $(($unit * 8 + $highpartoffset + 10))
mknod ${name}${unit}l b $blk $(($unit * 8 + $highpartoffset + 11))
mknod ${name}${unit}m b $blk $(($unit * 8 + $highpartoffset + 12))
mknod ${name}${unit}n b $blk $(($unit * 8 + $highpartoffset + 13))
mknod ${name}${unit}o b $blk $(($unit * 8 + $highpartoffset + 14))
mknod ${name}${unit}p b $blk $(($unit * 8 + $highpartoffset + 15))
mknod r${name}${unit}a c $chr $(($unit * 8 + 0))
mknod r${name}${unit}b c $chr $(($unit * 8 + 1))
mknod r${name}${unit}c c $chr $(($unit * 8 + 2))
@ -389,6 +399,14 @@ ccd*|fd*|sd*|vnd*|wd*|raid*)
mknod r${name}${unit}f c $chr $(($unit * 8 + 5))
mknod r${name}${unit}g c $chr $(($unit * 8 + 6))
mknod r${name}${unit}h c $chr $(($unit * 8 + 7))
mknod r${name}${unit}i c $chr $(($unit * 8 + $highpartoffset + 8))
mknod r${name}${unit}j c $chr $(($unit * 8 + $highpartoffset + 9))
mknod r${name}${unit}k c $chr $(($unit * 8 + $highpartoffset + 10))
mknod r${name}${unit}l c $chr $(($unit * 8 + $highpartoffset + 11))
mknod r${name}${unit}m c $chr $(($unit * 8 + $highpartoffset + 12))
mknod r${name}${unit}n c $chr $(($unit * 8 + $highpartoffset + 13))
mknod r${name}${unit}o c $chr $(($unit * 8 + $highpartoffset + 14))
mknod r${name}${unit}p c $chr $(($unit * 8 + $highpartoffset + 15))
chgrp operator $name$unit? r$name$unit?
chmod 640 $name$unit? r$name$unit?
;;

View File

@ -1,4 +1,4 @@
/* $NetBSD: disklabel.h,v 1.3 2001/09/15 15:04:45 uch Exp $ */
/* $NetBSD: disklabel.h,v 1.4 2002/03/23 03:14:54 shin Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@ -33,10 +33,24 @@
#ifndef _MACHINE_DISKLABEL_H_
#define _MACHINE_DISKLABEL_H_
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
#define MAXPARTITIONS 8 /* number of partitions */
#define RAW_PART 3 /* raw partition: XX?d (XXX) */
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
#define MAXPARTITIONS 16 /* number of partitions */
#define OLDMAXPARTITIONS 8 /* number of partitions before 1.6 */
#define RAW_PART 3 /* raw partition: XX?d (XXX) */
/*
* We use the highest bit of the minor number for the partition number.
* This maintains backward compatibility with device nodes created before
* MAXPARTITIONS was increased.
*/
#define __HPCMIPS_MAXDISKS ((1 << 20) / MAXPARTITIONS)
#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __HPCMIPS_MAXDISKS)
#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
((minor(dev) / (__HPCMIPS_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
#define DISKMINOR(unit, part) \
(((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
((part) / OLDMAXPARTITIONS) * (__HPCMIPS_MAXDISKS * OLDMAXPARTITIONS))
/* Pull in MBR partition definitions. */
#include <sys/disklabel_mbr.h>
@ -51,7 +65,7 @@ struct cpu_disklabel {
#ifdef _KERNEL
struct disklabel;
int bounds_check_with_label(struct buf *, struct disklabel *, int);
int bounds_check_with_label __P((struct buf *, struct disklabel *, int));
#endif
#endif /* _MACHINE_DISKLABEL_H_ */

View File

@ -1,5 +1,6 @@
/* $NetBSD: types.h,v 1.4 2001/06/13 06:03:11 enami Exp $ */
/* $NetBSD: types.h,v 1.5 2002/03/23 03:14:54 shin Exp $ */
#include <mips/types.h>
#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_OLD_DISKLABEL