move to new disk minor encoding (parts have lowest 4 bits instead of 3)
This commit is contained in:
parent
659ffb49cf
commit
3f9c050090
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: disksubr.c,v 1.12 1994/06/27 04:55:38 chopps Exp $
|
||||
* $Id: disksubr.c,v 1.13 1994/07/04 19:37:51 chopps Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -160,7 +160,7 @@ readdisklabel(dev, strat, lp, clp)
|
|||
if (lp->d_ncylinders != rbp->ncylinders)
|
||||
printf("warning found rdb->ncylinders(%d) != "
|
||||
"rdb->highcyl(%d) + 1\n", rbp->ncylinders,
|
||||
rbp->highcyl + 1);
|
||||
rbp->highcyl);
|
||||
if (lp->d_nsectors * lp->d_ntracks != rbp->secpercyl)
|
||||
printf("warning found rdb->secpercyl(%d) != "
|
||||
"rdb->nsectors(%d) * rdb->nheads(%d)\n", rbp->secpercyl,
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)swapgeneric.c 7.5 (Berkeley) 5/7/91
|
||||
* $Id: swapgeneric.c,v 1.14 1994/06/13 08:12:34 chopps Exp $
|
||||
* $Id: swapgeneric.c,v 1.15 1994/07/04 19:38:01 chopps Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -174,10 +174,10 @@ setconf()
|
|||
dkp->dk_driver->d_strategy)
|
||||
break;
|
||||
if (bdp->d_open(MAKEDISKDEV(major(gc->gc_root),
|
||||
unit, 3), FREAD | FNONBLOCK, 0, curproc))
|
||||
unit, 0), FREAD | FNONBLOCK, 0, curproc))
|
||||
continue;
|
||||
bdp->d_close(MAKEDISKDEV(major(gc->gc_root), unit, 0),
|
||||
FREAD | FNONBLOCK, 0, curproc);
|
||||
bdp->d_close(MAKEDISKDEV(major(gc->gc_root), unit,
|
||||
0), FREAD | FNONBLOCK, 0, curproc);
|
||||
pp = &dkp->dk_label.d_partitions[0];
|
||||
if (pp->p_size == 0 || pp->p_fstype != FS_BSDFFS)
|
||||
continue;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: fd.c,v 1.9 1994/06/20 06:36:47 chopps Exp $
|
||||
* $Id: fd.c,v 1.10 1994/07/04 19:39:07 chopps Exp $
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,9 +63,9 @@ enum fd_parttypes {
|
|||
#define FDSBSIZE (8192)
|
||||
|
||||
#define b_cylin b_resid
|
||||
#define FDUNIT(dev) (minor(dev) / MAXPARTITIONS)
|
||||
#define FDPART(dev) (minor(dev) % MAXPARTITIONS)
|
||||
#define FDMAKEDEV(m, u, p) makedev((m), (u) * MAXPARTITIONS + (p))
|
||||
#define FDUNIT(dev) DISKUNIT(dev)
|
||||
#define FDPART(dev) DISKPART(dev)
|
||||
#define FDMAKEDEV(m, u, p) MAKEDISKDEV((m), (u), (p))
|
||||
|
||||
#define FDNHEADS (2) /* amiga drives always have 2 heads */
|
||||
#define FDSECSIZE (512) /* amiga drives always have 512 byte sectors */
|
||||
|
|
Loading…
Reference in New Issue