summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-22 23:06:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-22 23:06:52 +0000
commit2447397fd9ec4e3345e0ecb526c8435759e1601e (patch)
treefe1c13f63ae1f4574c6d0d7a3ab2bd889c0b6291 /sys
parent98215910c2a0f22342cd5f0948bb9094e3367845 (diff)
for drives <10MB of so, print #.##MB for the size
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/sd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 0623e070a6c..b7ddb293178 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.33 1999/05/09 20:41:48 weingart Exp $ */
+/* $OpenBSD: sd.c,v 1.34 1999/07/22 23:06:51 deraadt Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*
@@ -236,10 +236,16 @@ sdattach(parent, self, aux)
if (error || sd_get_parms(sd, SCSI_AUTOCONF) != 0)
printf("drive offline\n");
- else
- printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec, %ld sec total\n",
- dp->disksize / (1048576 / dp->blksize), dp->cyls,
+ else {
+ printf("%ld", dp->disksize / (1048576 / dp->blksize));
+ if (dp->disksize < 11520)
+ printf(".%2ld",
+ dp->disksize / (1024*10 / dp->blksize) -
+ dp->disksize / (1048576 / dp->blksize) * 100);
+ printf("MB, %d cyl, %d head, %d sec, %d bytes/sec, %ld sec total\n",
+ dp->cyls,
dp->heads, dp->sectors, dp->blksize, dp->disksize);
+ }
}
/*