Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 1996 02:27:28 +0200 (SAT)
From:      Robert Nordier <rnordier@iafrica.com>
To:        luigi@labinfo.iet.unipi.it (Luigi Rizzo)
Cc:        hackers@freebsd.org
Subject:   Re: Determining disk type & size
Message-ID:  <199608290027.CAA00393@eac.iafrica.com>
In-Reply-To: <199608282135.XAA01269@labinfo.iet.unipi.it> from "Luigi Rizzo" at Aug 28, 96 11:35:09 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo wrote:
> 
> > Most of the userland code I've looked at doesn't seem to handle this
> > very elegantly, where it checks.  And some of my attempts to do the
> > obvious seem to produce inconsistent results (below).

> > ----- fdtest output -----
> > 
> > ./fdtest /dev/fd0
> > sectors per cylinder: 158 [<-- 30 expected]
> 
> 158 = 30 + 128
> maybe bit 7 is not significant, or used for different purposes.

Good point, which may also explain why the value is sometimes > 1024
on another disk in the same drive.

I guess it just means: read through the code line by line before
using any of this stuff.  Meaningful variable names only encourage
assumptions. :(

--
Robert Nordier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608290027.CAA00393>