file system collection Code
Brought to you by:
laizhefeng
File | Date | Author | Commit |
---|---|---|---|
ext2 | 2013-06-28 | laizhefeng | [r1] head version |
fat16 | 2013-06-28 | laizhefeng | [r1] head version |
iso9660 | 2013-06-28 | laizhefeng | [r1] head version |
readme | 2013-06-28 | laizhefeng | [r1] head version |
1. Overview 2. How to use fat16 project 3. How to use iso9660 project 4. How to use ext2 project 1. Overview I write these file systems(fat16, iso9660(data CD), ext2) by myself a few years ago. These code is not test hard, because I am not going to use them in any product, my purpose is to figure out how the data is stored on a hard drive by a specified file system, and how the file system to manage files, directorys, and paths. And for the same reason, these code is not implement completely, souch as the file system path, it only support ANSI charactors, and many aspects you will see in the code just for make coding simply and easily. There are a little comments in the code, and they are in chinese mostly, but you can find many DOCs and source code about these 3 file systems, below is some URLs. fat: http://www.o3one.org/hwdocs/fat_fs/fatgen103.doc http://code.google.com/p/exfat/ iso9660: http://alumnus.caltech.edu/~pje/iso9660.html ext2: http://www.nongnu.org/ext2-doc/ext2.html http://sourceforge.net/projects/ext2fsd/ http://sourceforge.net/projects/e2fsprogs/ I compile these project under Microsoft Window XP with Microsoft Visual Studio 2005. Any problem please contact Laizhefeng@gmail.com. 2. How to use fat16 project You will need a ram disk or file disk tool to test it, and I use the RamDisk. You should configure the disk to 16M bytes size, and change the drive letter in main.c accroding to you ram(file) disk drive letter. If you want to change the disk size we test, find 'TOTAL_SECTOR' in fat.c, as what I said in above I am not sure the program will still run without error if you change the disk size. 3. How to use iso9660 project This project only read a read-only CD to generate the directory tree in memory. I did not implement the fread/fseek and some other operations, but it's easy to read a file because the file is read-only and continuous in disk. You should create an ISO image to test this project first, and I use freeisocreater.exe. Change the iso image path in simcd.c, I guess it is better create a small image to test it(not too many directories, not too many files with small size). 4. How to use ext2 project When this project execute and finish, it will create an ext2fs.dsk file in the project directory, you should mount it under linux, or even run the fsck to scan it, so you can see the compatibility between a standard ext2 file system and this project.