diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-13 13:51:00 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-13 13:51:00 +0200 |
commit | be3ba38c452084cf6644d4ae6fb35ccf6abbb1cb (patch) | |
tree | 43834d981c3e6b39154a508f212e0ac920cea980 /sys | |
parent | 33a4a56c1c163192b0d166740e7d81fbde602d2a (diff) |
libfis: fix wrong shift for lba40 (thanks geoff and charles)
---------- Forwarded message ----------
From: Charles Forsyth <charles.forsyth@gmail.com>
Date: 13 September 2015 at 12:38
Subject: fis bug
To: erik quanstrom <quanstro@quanstro.net>
geoff spotted something similar in sdiahci.c, but it's in libfis as well:
c[Flba24] = lba >> 24;
c[Flba32] = lba >> 32;
c[Flba40] = lba >> 48;
>> 48?? should be >> 40, especially with drive sizes getting up there.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/libfis/fis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/libfis/fis.c b/sys/src/libfis/fis.c index 61a464852..4d52e623a 100644 --- a/sys/src/libfis/fis.c +++ b/sys/src/libfis/fis.c @@ -432,7 +432,7 @@ rwfis(Sfis *f, uchar *c, int rw, int nsect, uvlong lba) c[Flba24] = lba >> 24; c[Flba32] = lba >> 32; - c[Flba40] = lba >> 48; + c[Flba40] = lba >> 40; c[Ffeat8] = 0; c[Fsc] = nsect; |