diff options
author | kato <kato@FreeBSD.org> | 1997-01-04 10:28:01 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-01-04 10:28:01 +0000 |
commit | 14fe89930fe64db4d559faa94eb64513f93f286b (patch) | |
tree | 440a08927d4e61e36f5aa59d43033dfc03feb628 /sys | |
parent | 794d692ced7525f6941084d19cd5997fbf82ac87 (diff) | |
download | FreeBSD-src-14fe89930fe64db4d559faa94eb64513f93f286b.zip FreeBSD-src-14fe89930fe64db4d559faa94eb64513f93f286b.tar.gz |
Change types of wdp_cylinders, wdp_heads and wdp_sectors in struct
wdparams from short into u_short. If wdp_cylinders is short, it
overflows and cause serious sign extension bug when large IDE HDD is
used. These members are only used for initialization of u_long
variables in both 3.0-current and RELENG_2_2 branch.
I believe this should be in 2.2.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/isa/wdreg.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/isa/wdreg.h b/sys/i386/isa/wdreg.h index 73d0ba9..7838462 100644 --- a/sys/i386/isa/wdreg.h +++ b/sys/i386/isa/wdreg.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wdreg.h 7.1 (Berkeley) 5/9/91 - * $Id: wdreg.h,v 1.13 1996/11/02 10:37:08 asami Exp $ + * $Id: wdreg.h,v 1.14 1996/11/14 08:45:40 asami Exp $ */ /* @@ -142,12 +142,12 @@ struct wdparams { /* drive info */ short wdp_config; /* general configuration bits */ - short wdp_cylinders; /* number of cylinders */ + u_short wdp_cylinders; /* number of cylinders */ short wdp_reserved; - short wdp_heads; /* number of heads */ + u_short wdp_heads; /* number of heads */ short wdp_unfbytespertrk; /* number of unformatted bytes/track */ short wdp_unfbytes; /* number of unformatted bytes/sector */ - short wdp_sectors; /* number of sectors per track */ + u_short wdp_sectors; /* number of sectors per track */ short wdp_vendorunique[3]; /* controller info */ char wdp_serial[20]; /* serial number */ |