[ros-dev] Re: [ros-diffs] [hbirr] 13277: - Fixed the directory index of a file for FATX.

Hartmut Birr hartmut.birr at gmx.de
Tue Jan 25 22:42:51 CET 2005


Hervé Poussineau schrieb:

> hbirr at svn.reactos.com a écrit :
>
>> - Fixed the directory index of a file for FATX. 
>> +      ULONG startIndex = rcFcb->startIndex;
>> +      if ((rcFcb->Flags & FCB_IS_FATX_ENTRY) && !vfatFCBIsRoot(Parent))
>>
>>          {
>>
>> +          startIndex += 2;
>> +        }
>> +      if(startIndex >= DirContext->DirIndex)
>> +        {
>
>
> This change looks suspicious to me.
> "." and ".." don't exist on a FATX volume. They are FAT12/16/32 specific.
> Please revert related changes in create.c, dirw.c, direntry.c, fcb.c
>
> Hervé
>
> PS:
> Comment in direntry.c ("need to add . and .. entries".) is not very 
> clear. It may be modified to "Need to add . and .. entries, because 
> they don't exist in a FATX subdir"
> _______________________________________________
> Ros-diffs mailing list
> Ros-diffs at reactos.com
> http://reactos.com:8080/mailman/listinfo/ros-diffs
>
>
FATX doesn't have real '.' and '..' directories. But we use them on each 
directory except the root. The index from fcb is also used to update the 
entry of a file in its parent directory. For looking for a directory, 
'.' has index 0, '..' has index 1 and 'foo' has index 2 and so on. The 
real index of 'foo' is 0. We must make a difference between the real and 
the search index. I've modified some parts of freeldr and usetup. I can 
create and install ros on a fatx partition on a normal pc. I've also 
load vfatfs on W2K. At the beginning, the wrong index has scrambled the 
fatx partition.

- Hartmut



More information about the Ros-dev mailing list