diff options
| author | scw <scw@NetBSD.org> | 2006-11-25 12:03:38 +0000 |
|---|---|---|
| committer | scw <scw@NetBSD.org> | 2006-11-25 12:03:38 +0000 |
| commit | e34c588b57771e15c817f93d7e7a228e3eff789d (patch) | |
| tree | 3e6864ca40bc67e296645afefd10ebbc75982bfb /sys/dev | |
| parent | 512f329f6633e3ddaeeb9b0ac8a8de6bbe85e6db (diff) | |
- Call disk_blocksize(9) when we determine the physical block size of the
media. (Will this ever be anything other than 2048?)
- bounds_check_with_label() has been fixed, so put the correct partition
size in the default disklabel.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/scsipi/cd.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 1498b889b42..63e0b54d25e 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.258 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: cd.c,v 1.259 2006/11/25 12:03:38 scw Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.258 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.259 2006/11/25 12:03:38 scw Exp $"); #include "rnd.h" @@ -1643,21 +1643,11 @@ cdgetdefaultlabel(struct cd_softc *cd, struct disklabel *lp) lastsession = 0; lp->d_partitions[0].p_offset = 0; -#ifdef notyet /* have to fix bounds_check_with_label() first */ lp->d_partitions[0].p_size = lp->d_secperunit; -#else - lp->d_partitions[0].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); -#endif lp->d_partitions[0].p_cdsession = lastsession; lp->d_partitions[0].p_fstype = FS_ISO9660; lp->d_partitions[RAW_PART].p_offset = 0; -#ifdef notyet lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; -#else - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); -#endif lp->d_partitions[RAW_PART].p_fstype = FS_ISO9660; lp->d_npartitions = RAW_PART + 1; @@ -2011,6 +2001,7 @@ cd_get_parms(struct cd_softc *cd, int flags) */ if (cd_size(cd, flags) == 0) return (ENXIO); + disk_blocksize(&cd->sc_dk, cd->params.blksize); return (0); } |
