diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-07-22 23:06:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-07-22 23:06:52 +0000 |
commit | 2447397fd9ec4e3345e0ecb526c8435759e1601e (patch) | |
tree | fe1c13f63ae1f4574c6d0d7a3ab2bd889c0b6291 /sys | |
parent | 98215910c2a0f22342cd5f0948bb9094e3367845 (diff) |
for drives <10MB of so, print #.##MB for the size
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/sd.c | 14 |
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); + } } /* |