info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mtools] Reading label from a large capacity memory card


From: Alain Knaff
Subject: Re: [Mtools] Reading label from a large capacity memory card
Date: Sun, 15 Feb 2009 17:21:57 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Simon Large wrote:
> But after putting that in the problem still remains. For my 8GB memory
> card the XdfOpen() call succeeds and maxsize is set to max_off_t_31,
> which seems to be where the limit lies.

Under normal circumstances, XdfOpen() should only be used on floppy
disks. The problem here is that it succeeds on a memory card, it should
not. This is weird, as XdfOpen checks both that the use_xdf flag is set
on the device descriptor, and that the geometry is compatible with XDF...
Could you send me the (partition's) boot sector of that memory card?

> However, it seems that in init.c the value of maxsize is not
> initialized. If the device opens as a floppy or XDF then maxsize is
> always set to max_off_t_31, but if it falls back to SimpleFileOpen(),
> then maxsize just has whatever random value was there when fs_init()
> starts. Sounds like a bug to me.
> 
> Not sure where to go from here.

I'm not really sure where you're getting that from. SimpleFileOpen does
initialize maxSize (on success). I even doublechecked on 3.9.11 (then
current), and it did so even then.

On failure, SimpleFileOpen does not initialize maxSize, but in that case
it is not needed anyways.

Regards,

Alain


reply via email to

[Prev in Thread] Current Thread [Next in Thread]