The current design of defrag, chkdsk, recover FAT manipulation utilities in FreeDOS is that there is a FAT manipulation library called the "FAT transformation engine" that all the other utilities use.
The big benefit of using this library is that it let's you write code to manipulate the FAT file system that works on FAT12, FAT16, FAT32 without knowing the exact FAT file system this is going to run on. The same code works for FAT12, FAT16, FAT32 without having code that looks like:
if it is FAT12 do this, and if it is FAT16 do that and if it is FAT32 do again something else.
Like is done in the reactos loader (freeloader?)
This is optimized code that is used in real life programs.
Anyway this could be used as the basis for ufat.dll. The utilities that already use this library could then also be put in here. And the rest can then be easily written.
What would then be needed is the actual functions that make up the interface to ufat.dll.
I've seen that there is example code on the internet that uses these functions. On http://www.sysinternals.com/SourceCode/fmifs.html
Imre
-----Original Message----- From: Steven Edwards [mailto:winehacker@gmail.com] Sent: Monday, September 4, 2006 02:23 AM To: 'ReactOS Development List' Subject: Re: [ros-dev] Command line
On 9/3/06, Aleksey Bragin aleksey@studiocerebral.com wrote:
We are really in demand of a working check-disk utility, so I gladly accept any correctly working version compatible with Windows (as in: not depending on specific ReactOS's features). It doesn't stop us from implementing fmifs.dll, uFILESYSTEM.dll's, etc too. Even helps, I would say.
Thats why I started porting the dosfsck a while back. Some of the lower level dlls for filesystem checking are highly obfuscated. It would be better to have a working tool now rather than never.
-- Steven Edwards
"There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo _______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
The big benefit of using this library is that it let's you write code to manipulate the FAT file system that works on FAT12, FAT16, FAT32 without knowing the exact FAT file system this is going to run on. The same code works for FAT12, FAT16, FAT32 without having code that looks like:
In ROS each FS driver has to implement the defrag APIs. An application can defrag any FS by using the 3 publicly documented IOCTLs. UFAT/UNTFS/Uxxx... is not used for fs defragmentation.
Anyway this could be used as the basis for ufat.dll. The utilities that already use this library could then also be put in here. And the rest can then be easily written.
As mentioned above, defragmentation is done by the fs drivers in kernel mode.
What would then be needed is the actual functions that make up the interface to ufat.dll.
We can design the interfaces to ufat, untfs, ... as we wish. These interfaces are not documented publicly as there is no standard. each FS should come with it's own utilities. Chkdsk can only be used with the file systems that come with windows/reactos, other FS need to provide their own tools.
- Thomas