diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-03-31 21:17:12 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-03-31 21:17:12 +0000 |
| commit | 1f3a74b1b14801717c05497b09c09922e8bc2ed1 (patch) | |
| tree | 2f98be6e543d5b073f996784b8e6b4aa1897517f | |
| parent | 80c7362ce3e57baeb63254bdc66233e5bcc2c52c (diff) | |
Notes
| -rw-r--r-- | sys/kern/subr_diskslice.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index f6736cfba969..8120e550f3a0 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -407,6 +407,19 @@ dsioctl(dev, cmd, data, flags, sspp) *(struct disklabel *)data = *lp; return (0); + case DIOCGSECTORSIZE: + if (lp == NULL) + return (EINVAL); + *(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; + return (0); + case DIOCGPART: if (lp == NULL) return (EINVAL); |
