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: Simon Large
Subject: Re: [Mtools] Reading label from a large capacity memory card
Date: Tue, 17 Feb 2009 09:46:09 -0000

Alain Knaff wrote:
> 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?    

The requirement to read the volume name went away, so I have not used
mtools for some time :-(

Further information - the card I was trying to read was actually SDHC,
not SD, although I guess that is obvious from the capacity. If you are
still interested I can extract the boot sector, but I will need to dig
out the system it was running on.

Pardon my ignorance (we're mostly a Windows shop here) but if you can
give me an appropriate 'dd' command line it will save me guessing and
sending you a file of useless garbage ;-)

> 
>> 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. 

No, I'm not sure now. It was a long time ago. Sounds like I
misunderstood the flow of the code.

Simon


reply via email to

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