VFAT file system structure Detailed explanation (Agan translation)

xiaoxiao2021-03-06  172

Http://www.nondot.org/sabre/os/files/filesystems/vfatinfo.txt

VFAT file system structure detailed --------------------------------------------- --------------------------------------- (This document is made from Galen C. Hunt < Gchunt@cs.rochester.edu> is provided and commented by Gordon Chaffee

This document provides an extension FAT file system that I use on Windows NT 3.5 and Windows 95, some rough, technical profiles. I don't guarantee the following point of view, although it looks correct.

Extending the FAT file system is almost identical to the FAT file system used by DOS 6.223410239847 (including 6.223410239847), the most significant change is support for long file names. It allows the name to 255 characters long, including spaces and lowercase letters, and only support 8.3 name length. (8 characters of the main file name, 3 characters extension file name)

Here is the traditional FAT interface description on the current Windows 95 file system:

Struct Directory {// Short 8.3 Name Unsigned Char Name [8]; // Main File Name Unsigned Char Ext [3]; // File Extension Unsigned CHAR Attr; // Property Unsigned Char Lcase; // Main Will Name Extended Size Sign Unsigned Char CTIME_MS; // Create Time (Microsecond) Unsigned Char CTIME [2]; // Create Time Unsigned Char Cdate [2]; // Create Date Unsigned Char Adate [2]; // Final One visit date Unsigned char reserved [2]; // Reserved byte (ignore) unsigned char time [2]; // Timestamp Unsigned Char Date [2]; // Date Stamp Unsigned C HAR start [2]; // Start cluster number unsigned char size [4]; // file size}; where LCase domain description main file name and (or) extended file name "Based on 8.3 Name" is uppercase. This domain does not seem to be used on Windows 95, but it has been applied on Windows NT. The case's case is not fully compatible from Windows NT to Windows 95, and it is not entirely compatible. If you use 8.3 namespaces on Windows NT, your lowercase file name will turn over WINDOWS95.

Note: The "Start" domain and "sized" domain value small end integer value. (About the big end, the small end is a description of the data stored in memory) The interpretation of the domain in this structure has been known for everyone, and can be found in many other places.

In the extended FAT file system, Microsoft inserts some additional directory portions for any files that use extended names. (Any names that match the old-fashioned 8.3 coding rules will not have additional items) I have added these additions to the interface. Basically, an interface is a special format directory entry point, which can support 13 characters of file extensions named. These interfaces can be regarded as an additional label corresponding to the file directory. Microsoft tends to name 8.3 as an alias as a file, and make the extended file directory into the file name. Below is a C language structure of the directory entry point interface:

Struct slot {// Expand to 13 characters long text name unsigned char ID // interface serial number unsigned char name0_4 [10]; // The first 5 characters of the name Unsigned char attr; // Property Unsigned Char Reserved ; 总 0 0 Unsigned char alias_checksum; // 8.3 Alias ​​Test Code Unsigned char name5_10 [12]; // Name Next 6 characters Unsigned char start [2]; // Start cluster number unsigned char name11_12 [4 ]; // The last two characters}; if the implementation of the interface is a bit awkward, it is because Microsoft wants to maintain compatibility of the previous software. The design of the interface must prevent conflicts with old software. Here are some measures to prevent conflicts:

1> The attribute byte of the directory entry point interface is always set to 0x0f. This corresponds to the old file directory to enter the point interface, and the old file entry point interface contains "hidden", "system", "read-only", and "Save" properties. Many old-fashioned software ignores the settings of the archive flag of the directory entry. The real archive interface does not place the other three markers. 2> The starting position of the cluster is always set to 0, and the DOS file cannot be set to this value. Because the compatibility of the expanded FAT file system is very awkward, the old software can modify the directory entry point. Measures must be taken to ensure the effectiveness of the directory entry. The extended FAT file system can distinguish between the 8.3 directory interface by following the steps: 1> Positioning. The interface of the file always processes their 8.3 directory entry. In addition, each interface has an identification (ID) identifying it in the extended file name structure. Below to simply analyze a 8.3 directory interface and the long file named interface he corresponds to. This file name is: "My BIG File.extension Which is long"

Note: These interface storage sequences are previously marked from 1 to N, and the nth interface identifies and 0x40 or calculates from 1 to N, indicating that it is the last interface. 2> Good tests (Checksum). Each interface has a value of "alias_checksum", this papers are from 8.3 name rules, based on the algorithms below: for (SUM = I = 0; i <11; i ) {SUM = ((SUM & 1) << 7) | ((SUM & 0XFE) >> 1)) Name [i]}

3> If in the last interface, a Unicode's NULL (0x0000) is stored behind the last character. Then all unused characters in the last interface are set to Unicode 0xFFFF.

Finally, pay attention to the extension names are stored in Unicode. Each Unicode character takes up two bytes.

Some details in the form of Unicode in the vfAT system /// (Information provided by steve searle )

Char used as Char (s) used Char (s) used in Entries which havefilename in shortname longname slot been corrected0x80 (128) 0x80 0xC7 0x81 (129) 0x9A 0xFC0x82 (130) 0x90 0xE9 E0x83 (131) 0xB6 0xE2 E0x84 (132) 0x8E 0xE4 E0x85 (133) 0xB7 0xE0 E0x86 (134) 0x8F 0xE5 E0x87 (135) 0x80 0xE7 E0x88 (136) 0xD2 0xEA E0x89 (137) 0xD3 0xEB E0x8A (138) 0xD4 0xE8 E0x8B (139) 0xD8 0xEE E0x8C (140) 0xD7 0xee E0x8d (141) 0xDE 0XEC E0x8e (142) 0x8e 0xc4 E0x8f (143) 0x8f 0xc5 E0x90 (144) 0x90 0xc9 E0x91 (145) 0x92 0xE6 E0X92 (146) 0x92 0xc6 E0X93 (147) 0xE2 0xF4 E0x94 (148) 0x99 0xf60x95 (149) 0xE3 0xf20x97 (151) 0xeb 0xf90x98 (152) "_ ~ 1 "

0xFF0x99 (153) 0x99 0xD60x9A (154) 0x9A 0xDC0x9B (155) 0x9D 0xF80x9C (156) 0x9C 0xA30x9D (157) 0x9D 0xD80x9E (158) 0x9E 0xD70x9F (159) 0x9F 0x920xA0 (160) 0xB5 0xE10xA1 (161) 0xD6 0xE00xA2 (162) 0xE0 0xF30xA3 (163) 0xE9 0xFA0xA4 (164) 0xA5 0xF10xA5 (165) 0xA5 0xD10xA6 (166) 0xA6 0xAA0xA7 (167) 0xA7 0xBA0xA8 (168) 0xA8 0xBF0xA9 (169) 0xA9 0xAE0xAA (170) 0xAA 0xAC0xAB (171) 0xAB 0xBD0xAC (172) 0xAC 0xBC0xAD (173) 0xAD 0xA10xAE (174) 0xAE 0xAB0xAF (175) 0xAF 0xBB0xB0 (176) 0xB0 0x91 0x250xB1 (177) 0xB1 0x92 0x250xB2 (178) 0xB2 0x93 0x250xB3 (179) 0xB3 0x02 0x250xB4 (180) 0xB4 0x24 0x250xB5 (181) 0xB5 0xC10xB6 (182) 0xB6 0xC20xB7 (183) 0xB7 0xC00xB8 (184) 0xB8 0xA90xB9 (185) 0xB9 0x63 0x250xBA (186) 0xBA 0x51 0x250xBB (187) 0xBB 0x57 0x250xBC (188) 0xBC 0x5D 0x250xBD (189) 0xBD 0xA20xBE (190) 0xBE 0xA50xBF (191) 0xBF 0x10 0x250xC0 (192) 0xC0 0x14 0x250xC1 (193) 0xC1 0x34 0x250xC2 (194) 0xC2 0x2C 0x250xC3 (195) 0xC3 0x1C 0x250xC4 (196) 0xC4 0x00 0x250xC5 (197) 0xC5 0x3C 0x250xC6 (198) 0xC7 0xE3 E0xC7 (199 0xC7 0xc30XC8 (200) 0xc8 0x5a 0

x25 E0xC9 (201) 0xC9 0x54 0x25 E0xCA (202) 0xCA 0x69 0x25 E0xCB (203) 0xCB 0x66 0x25 E0xCC (204) 0xCC 0x60 0x25 E0xCD (205) 0xCD 0x50 0x25 E0xCE (206) 0xCE 0x6C 0x25 E0xCF (207) 0xCF 0xA4 E0xD0 (208) 0xD1 0xF00xD1 (209) 0xD1 0xD00xD2 (210) 0xD2 0xCA0xD3 (211) 0xD3 0xCB0xD4 (212) 0xD4 0xC80xD5 (213) 0x49 0x31 0x010xD6 (214) 0xD6 0xCD0xD7 (215) 0xD7 0xCE0xD8 (216) 0xD8 0xCF0xD9 (217) 0xD9 0x18 0x250XDA (218) 0xDB (219) 0x250XDB (219) 0xDB 0x88 0x250XDC (220) 0xDC 0x84 0x250XA60XDE (222) 0xDE 0XC0XDF (223) 0xDF 0x80 0x250XE0 (224) 0xE0 0xD30xE1 (225) 0xE1 0xDF0xE2 (226) 0xE2 0xD40xE3 (227) 0xE3 0xD20xE4 (228) 0x05 0xF50xE5 (229) 0x05 0xD50xE6 (230) 0xE6 0xB50xE7 (231) 0xE8 0xFE0xE8 (232) 0xE8 0xDE0xE9 (233) 0xE9 0xDA0xEA (234) 0xEA 0xDB0xEB (235) 0xEB 0xD90xEC (236) 0xED 0xFD0xED (237) 0xED 0xDD0xEE (238) 0xEE 0xAF0xEF (239) 0xEF 0xB40xF0 (240) 0xF0 0xAD0xF1 (241) 0xF1 0xB10xF2 (242) 0xF2 0x17 0x200xF3 (243) 0xF3 0xBE0xF4 (244 0xF4 0xB60XF5 (245) 0xf5 0xa70xf6 (246)

0xF6 0xF70xF7 (247) 0xF7 0xB80xF8 (248) 0xF8 0xB00xF9 (249) 0xF9 0xA80xFA (250) 0xFA 0xB70xFB (251) 0xFB 0xB90xFC (252) 0xFC 0xB30xFD (253) 0xFD 0xB20xFE (254) 0xFE 0xA0 0x250xFF (255) 0xFF 0xA0Page 00x80 ( 128) 0x000x81 (129) 0x000x82 (130) 0x000x83 (131) 0x000x84 (132) 0x000x85 (133) 0x000x86 (134) 0x000x87 (135) 0x000x88 (136) 0x000x89 (137) 0x000x8a (138) 0x000x8b (139) 0x000x8c (140) 0x000x8D (141) 0x000x8E (142) 0x000x8f (143) 0x000x90 (144) 0x000x91 (145) 0x000x92 (146) 0x000x93 (147) 0x000x94 (148) 0x000x95 (149) 0x000x96 (150) 0x000x97 (151) 0x000x98 (152) 0x000x99 ( 153) 0x000x9a (154) 0x000x9b (155) 0x000x9c (156) 0x000x9D (157) 0x000x9E (158) 0x000x9f (159) 0x920xa0 (160) 0xFF0XA1 (161) 0xAD0XA2 (162) 0xB D0xA3 (163) 0x9C0xA4 (164) 0xCF0xA5 (165) 0xBE0xA6 (166) 0xDD0xA7 (167) 0xF50xA8 (168) 0xF90xA9 (169) 0xB80xAA (170) 0x000xAB (171) 0xAE0xAC (172) 0xAA0xAD (173) 0xF00xAE (174) 0x000xAF ( 175) 0xEE0xB0 (176) 0xF80xB1 (177) 0xF10xB2 (178) 0xFD0xB3 (179) 0xFC0xB4 (180) 0xEF0xB5 (181) 0xE60xB6 (182) 0xF40xB7 (183) 0xFA0xB8 (184) 0xF70xB9 (185) 0xFB0xBA (186) 0x000xBB (187) 0xAF0XBC (188) 0XAB0XBD (189) 0xAB0XBE (190) 0xF30XBF (191) 0x000XC0 (192) 0xB70XC1 (193) 0xB50XC2 (194) 0xC4 (197) 0x8E0XC5 (197) 0x8f0XC6 (198) 0x920xc7 (199) 0x800xc8 ( 200) 0x40XC9 (201) 0x900xca

转载请注明原文地址:https://www.9cbs.com/read-128283.html

New Post(0)