From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] dossrv panics
Date: Wed, 13 Mar 2002 00:21:23 -0500 [thread overview]
Message-ID: <dbcd3703433278d56639d0356e829f81@plan9.bell-labs.com> (raw)
In dossubs.c:/^getfat, change
/*
* this is a very strange check for out of range
*/
>>> if(k >= (1 << fb) - 7)
return -1;
to
/*
* This is a very strange check for out of range.
* As a concrete example, for a 16-bit FAT,
* FFF8 through FFFF all signify ``end of cluster chain.''
* This generalizes to other-sized FATs.
*/
if(k >= (1 << fb) - 8)
(Note the s/7/8/ in addition to the big comment.)
and let me know whether that solves your problem.
On a related note, in dossubs.c:/^truncfile, I think that
while(clust > 0){
next = getfat(xf, clust);
if(n <= 0)
putfat(xf, clust, 0);
else
>>> n -= bp->sectsize;
clust = next;
}
should be
n -= bp->clustsize*bp->sectsize;
It doesn't matter, since we only call truncfile
with a count of 0.
Russ
next reply other threads:[~2002-03-13 5:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-13 5:21 Russ Cox [this message]
2002-03-13 7:00 ` Quinn Dunkan
-- strict thread matches above, loose matches on Subject: below --
2002-03-13 14:32 Russ Cox
2002-03-13 7:38 forsyth
2002-03-13 4:27 Quinn Dunkan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbcd3703433278d56639d0356e829f81@plan9.bell-labs.com \
--to=rsc@plan9.bell-labs.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).