Index: subr_diskslice.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_diskslice.c,v retrieving revision 1.105 diff -u -r1.105 subr_diskslice.c --- subr_diskslice.c 21 Jun 2002 06:18:02 -0000 1.105 +++ subr_diskslice.c 28 Jun 2002 03:48:03 -0000 @@ -406,15 +406,17 @@ case DIOCGSECTORSIZE: if (lp == NULL) - return (EINVAL); - *(u_int *)data = lp->d_secsize; + *(u_int *)data = ssp->dss_secsize; + else + *(u_int *)data = lp->d_secsize; return (0); case DIOCGMEDIASIZE: if (lp == NULL) - return (EINVAL); - *(off_t *)data = (off_t)lp->d_partitions[dkpart(dev)].p_size * - lp->d_secsize; + *(off_t *)data = (off_t)sp->ds_size * ssp->dss_secsize; + else + *(off_t *)data = (off_t)lp->d_partitions[dkpart(dev)].p_size * + lp->d_secsize; return (0); case DIOCGSLICEINFO: