Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 1995 21:36:19 -0800
From:      PVinci@ix.netcom.com (Paul Vinciguerra)
To:        hackers@FreeBSD.org
Subject:   why does WD.C work??
Message-ID:  <199503170536.VAA16217@ix4.ix.netcom.com>

next in thread | raw e-mail | index | archive | help
in WD.C, when we READP (read the drive parameters) we bring the 
parameters into a buffer (tb. I think) then we bcopy it to wd, the 
wdparam structure. We do something like:

	bcopy(tb, wd, sizeof(wdparam));

What I see, is that the wdparam structure is wrong according to table 12 
of ATA.  eg.
	word 0	General Config.
	word 1	# logical Cyl.
	word 2	reserved
	word 3	# logical heads.
but wdparam looks like:

	struct wdparams {
		/* drive info */
	short	wdp_config;		/* general configuration */
	short	wdp_fixedcyl;		/* number of non-removable 	
					Cylinders */
	short	wdp_removcyl;	/* number of removable cylinders */
	short	wdp_heads;		/* number of heads */
	short	wdp_unfbytespertrk;	/* number of unformatted 	
					bytes/track */

 
Doesn't the bcopy cause a mismapping of the fields by ignoring all the 
reserved and vendor specific fields, or am I missing something?





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