diskpart.h

来自「ST5518机顶盒系统文件系统源代码!绝对超值!」· C头文件 代码 · 共 51 行

H
51
字号
/******************************************************************************File Name : partitio.hDescription: Partition table management******************************************************************************/#ifndef  DISK_PARTITION_H#define  DISK_PARTITION_H    /* Includes ------------------------------------------------------------ */    #include "avdevice.h"    /* Exported Types ------------------------------------------------------ *//* This structure defines the layout of the partition table   in the first sector on disk */typedef struct{    char Active;      /* Flags the active partition */    char StartCHS[3]; /* Start sector in CHS (not used) */    char Type;        /* 0x00 - unused 0xE0 - avfs partition */    char SizeCHS[3];  /* Size of part in CHS (not used) */    U32  StartLBA;    /* Start sector in LBA format */    U32  SizeLBA;     /* Size of the partition in sectors */} stavfs_DiskPartitionTable_t;    /* Exported Constants -------------------------------------------------- */#define AVFS_PARTITION    (0XE0)      /* Partition type (Magic number) */#define NUM_OF_PARTITIONS    (4)      /* Number of Partitions */#define BOOT_LOADER_SIZE   (446)      /* The PC boot loader consumes the                                        first 446 bytes on a disk */    /* Exported Variables -------------------------------------------------- */    /* Exported Macros ----------------------------------------------------- */    /* Exported Function Prototypes ---------------------------------------- */ST_ErrorCode_t stavfs_ReadPartitionTable  (stavfs_Device_t *Device_p, stavfs_DiskPartitionTable_t *PartitionInfo);ST_ErrorCode_t stavfs_WritePartitionTable (stavfs_Device_t *Device_p, stavfs_DiskPartitionTable_t *PartitionInfo);ST_ErrorCode_t stavfs_SetThePartitionEntry(stavfs_Device_t *Device_p,  U64 const *Position_p, U64 *SpaceInSectors_p);#endif

⌨️ 快捷键说明

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