⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xsfs.h

📁 一个操作系统,用C语言实现开发的,我在一个浙江大学的操作系统实验网站找到.大家学习以下
💻 H
字号:
// eXtendable Stream-based File System

#ifndef __XSFS_H
#define __XSFS_H

#include <knldefs.h>

#ifdef _MSC_VER
#pragma pack(push, 1)
#endif

typedef struct _XSFSDESC
{
	_u32 version;			// FileSystem version
	_u16 sector_size;		// Physical sector size
	_u16 n_scale;			// Logical allocating unit size
	_u32 n_sectors;			// Total sectors
	_u32 n_units;			// Total logical units
	_u16 n_reserved;		// Reserved sectors
	_u16 n_ss_desc;			// Number of sectors of System Streams Descriptor
	_u16 n_bitmap;			// Number of units of Allocating Bitmap
	_u16 pad;
} XSFSDESC;

#define MAX_PRI_INDEX	12
#define MAX_SEC_INDEX	3
typedef struct _XSFSSTREAM
{
	_u32 flags;
	_u32 pri_index[MAX_PRI_INDEX];
	_u32 sec_index[MAX_SEC_INDEX];
} XSFSSTREAM;

typedef struct _XSFSIMAGE	// image in boot sector
{
	char jmps[3], signature[9];
	XSFSDESC descriptor;
	_u32 reserved[8];
} XSFSIMAGE;

#ifdef _MSC_VER
#pragma pack(pop)
#endif

// XSFS device image description
// Partition Image:
//      ReservedSectors		BootSector
//							BootLoader
//		SystemStreamsDescriptor
//		DataArea			AllocatingBitmap
//							SystemStreams
// Notes:
//      Logical unit index 0 starts at DataArea.  That means Allocating Bitmap
// occupies the 0 unit, and index 0 then can be used as null-reference

// Reserved system stream index
#define SSI_BITMAP		0
#define SSI_BITMAPHASH	1
#define SSI_FSTREE		2

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -