From: Bill Nottingham <notting@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com, chaffee@cs.berkeley.edu
Subject: PATCH: fix FAT32 filesystems on 64-bit platforms
Date: Thu, 14 Dec 2000 19:09:30 -0500 [thread overview]
Message-ID: <20001214190930.C12088@nostromo.devel.redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 161 bytes --]
This fixes FAT32 on 64-bit platforms (notably, IA-64 and Alpha);
without this you can't mount any FAT32 filesystems. A similar patch
is already in 2.2.18.
Bill
[-- Attachment #2: linux-2.4.0-test12-vfat.patch --]
[-- Type: text/plain, Size: 1606 bytes --]
--- linux/fs/fat/cache.c.foo Sat Nov 25 16:30:47 2000
+++ linux/fs/fat/cache.c Sat Nov 25 16:32:29 2000
@@ -70,7 +70,7 @@
}
if (MSDOS_SB(sb)->fat_bits == 32) {
p_first = p_last = NULL; /* GCC needs that stuff */
- next = CF_LE_L(((unsigned long *) bh->b_data)[(first &
+ next = CF_LE_L(((__u32 *) bh->b_data)[(first &
(SECTOR_SIZE-1)) >> 2]);
/* Fscking Microsoft marketing department. Their "32" is 28. */
next &= 0xfffffff;
@@ -79,12 +79,12 @@
} else if (MSDOS_SB(sb)->fat_bits == 16) {
p_first = p_last = NULL; /* GCC needs that stuff */
- next = CF_LE_W(((unsigned short *) bh->b_data)[(first &
+ next = CF_LE_W(((__u16 *) bh->b_data)[(first &
(SECTOR_SIZE-1)) >> 1]);
if (next >= 0xfff7) next = -1;
} else {
- p_first = &((unsigned char *) bh->b_data)[first & (SECTOR_SIZE-1)];
- p_last = &((unsigned char *) bh2->b_data)[(first+1) &
+ p_first = &((__u8 *) bh->b_data)[first & (SECTOR_SIZE-1)];
+ p_last = &((__u8 *) bh2->b_data)[(first+1) &
(SECTOR_SIZE-1)];
if (nr & 1) next = ((*p_first >> 4) | (*p_last << 4)) & 0xfff;
else next = (*p_first+(*p_last << 8)) & 0xfff;
@@ -92,10 +92,10 @@
}
if (new_value != -1) {
if (MSDOS_SB(sb)->fat_bits == 32) {
- ((unsigned long *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
+ ((__u32 *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
2] = CT_LE_L(new_value);
} else if (MSDOS_SB(sb)->fat_bits == 16) {
- ((unsigned short *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
+ ((__u16 *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
1] = CT_LE_W(new_value);
} else {
if (nr & 1) {
next reply other threads:[~2000-12-15 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-15 0:09 Bill Nottingham [this message]
2000-12-15 7:08 ` PATCH: fix FAT32 filesystems on 64-bit platforms Albert D. Cahalan
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=20001214190930.C12088@nostromo.devel.redhat.com \
--to=notting@redhat.com \
--cc=chaffee@cs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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).