📄 fat.h
字号:
/* * R/O (V)FAT 12/16/32 filesystem implementation by Marcus Sundberg * * 2002-07-28 - rjones@nexus-tech.net - ported to ppcboot v1.1.6 * 2003-03-10 - kharris@nexus-tech.net - ported to u-boot * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * */#ifndef _FAT_H_#define _FAT_H_#include <asm/byteorder.h>#define CONFIG_SUPPORT_VFAT#define SECTOR_SIZE FS_BLOCK_SIZE#define FS_BLOCK_SIZE 512#if FS_BLOCK_SIZE != SECTOR_SIZE#error FS_BLOCK_SIZE != SECTOR_SIZE - This code needs to be fixed!#endif#define MAX_CLUSTSIZE 65536#define DIRENTSPERBLOCK (FS_BLOCK_SIZE/sizeof(dir_entry))#define DIRENTSPERCLUST ((mydata->clust_size*SECTOR_SIZE)/sizeof(dir_entry))#define FATBUFBLOCKS 6#define FATBUFSIZE (FS_BLOCK_SIZE*FATBUFBLOCKS)#define FAT12BUFSIZE ((FATBUFSIZE*2)/3)#define FAT16BUFSIZE (FATBUFSIZE/2)#define FAT32BUFSIZE (FATBUFSIZE/4)/* Filesystem identifiers */#define FAT12_SIGN "FAT12 "#define FAT16_SIGN "FAT16 "#define FAT32_SIGN "FAT32 "#define SIGNLEN 8/* File attributes */#define ATTR_RO 1#define ATTR_HIDDEN 2#define ATTR_SYS 4#define ATTR_VOLUME 8#define ATTR_DIR 16#define ATTR_ARCH 32#define ATTR_VFAT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)#define DELETED_FLAG ((char)0xe5) /* Marks deleted files when in name[0] */#define aRING 0x05 /* Used to represent '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -