mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Vid Strpic <vms@bofhlet.net>, linux-kernel@vger.kernel.org
Subject: Re: *FAT problem in 2.6.0-test8
Date: Sat, 25 Oct 2003 13:05:14 +0200	[thread overview]
Message-ID: <20031025110514.GA9553@win.tue.nl> (raw)
In-Reply-To: <87ismdoc2s.fsf@devron.myhome.or.jp>

On Sat, Oct 25, 2003 at 07:18:03PM +0900, OGAWA Hirofumi wrote:

> It looks like it doesn't conform to Microsoft's or SmartMedia's
> specifications.
> 
> Yes. It will be important to know how it was formated. 

Yesterday I wondered whether I should propose a patch,
say something like

--- /linux/2.6/linux-2.6.0test6/linux/fs/fat/inode.c    Sat Aug  9 22:16:54 2003
+++ ./inode.c   Sat Oct 25 00:04:18 2003
@@ -931,13 +931,17 @@
                error = first;
                goto out_fail;
        }
-       if (FAT_FIRST_ENT(sb, media) != first
-           && (media != 0xf8 || FAT_FIRST_ENT(sb, 0xfe) != first)) {
-               if (!silent) {
+       if (FAT_FIRST_ENT(sb, media) == first) {
+               /* all is as it should be */
+       } else if (media == 0xf8 && FAT_FIRST_ENT(sb, 0xfe) == first) {
+               /* bad, reported on pc9800 */
+       } else if (first == 0) {
+               /* bad, reported once with a SmartMedia card */
+       } else {
+               if (!silent)
                        printk(KERN_ERR "FAT: invalid first entry of FAT "
                               "(0x%x != 0x%x)\n",
                               FAT_FIRST_ENT(sb, media), first);
-               }
                goto out_invalid;
        }
 
but maybe a single report does not suffice. It would be good to confirm
that certain devices write 0 there. (I would have asked the reporter
to do "dd if=/dev/zero of=/dev/something" and reinsert the card into
the camera, but fiddling with smartmedia cards is a bit dangerous -
not all readers and not all cameras are able to recover from such a
situation, so the card might become unusable without access to other
readers or other cameras.)

Andries

[BTW - Does anyone have more information about this other nonstandard
value, apparently found on pc9800?]


  parent reply	other threads:[~2003-10-25 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-24 10:32 Vid Strpic
2003-10-24 18:59 ` Andries Brouwer
2003-10-25 10:18   ` OGAWA Hirofumi
2003-10-25 10:55     ` Vid Strpic
2003-10-25 16:43       ` OGAWA Hirofumi
2003-10-25 17:41         ` Vid Strpic
2003-10-25 18:32           ` OGAWA Hirofumi
2003-10-25 11:05     ` Andries Brouwer [this message]
2003-10-25 18:43       ` OGAWA Hirofumi

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=20031025110514.GA9553@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vms@bofhlet.net \
    /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

Powered by JetHome