VirtualBox

Changeset 76292 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Dec 19, 2018 1:49:08 PM (6 years ago)
Author:
vboxsync
Message:

Runtime/fs/extvfs: Working on parsing block group and inode descriptors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/ext.h

    r76256 r76292  
    4141 * https://www.kernel.org/doc/html/latest/filesystems/ext4/index.html
    4242 */
     43
     44/** Offset where to find the first superblock on the disk, this is constant. */
     45#define EXT_SB_OFFSET               1024
    4346
    4447/** @name EXT_INODE_NR_XXX - Special inode numbers.
     
    136139    uint8_t     cBlocksPrealloc;
    137140    /** 0xcd: Number of blocks to try to preallocate for directories. */
    138     uint8_t     cBlocksPreallocDirextory;
     141    uint8_t     cBlocksPreallocDirectory;
    139142    /** 0xce: Number of reserved group descriptor entries for future filesystem expansion. */
    140143    uint16_t    cGdtEntriesRsvd;
     
    505508/** Pointer to an ext block group descriptor. */
    506509typedef EXTBLOCKGROUPDESC32 *PEXTBLOCKGROUPDESC32;
     510/** Pointer to a const 32 byte block group descriptor. */
     511typedef const EXTBLOCKGROUPDESC32 *PCEXTBLOCKGROUPDESC32;
     512
    507513
    508514/**
     
    539545/** Pointer to an ext block group descriptor. */
    540546typedef EXTBLOCKGROUPDESC64 *PEXTBLOCKGROUPDESC64;
     547/** Pointer to a const 64 byte block group descriptor. */
     548typedef const EXTBLOCKGROUPDESC64 *PCEXTBLOCKGROUPDESC64;
    541549
    542550/** @name EXT_GROUP_DESC_F_XXX - Group descriptor flags
     
    549557#define EXT_GROUP_DESC_F_INODE_ZEROED                RT_BIT_16(2)
    550558/** @} */
     559
     560
     561/**
     562 * Combiend view of the different block gorup descriptor versions.
     563 */
     564typedef union EXTBLOCKGROUPDESC
     565{
     566    /** 32 byte version. */
     567    EXTBLOCKGROUPDESC32    v32;
     568    /** 64 byte version. */
     569    EXTBLOCKGROUPDESC64    v64;
     570    /** Byte view. */
     571    uint8_t               au8[64];
     572} EXTBLOCKGROUPDESC;
     573/** Poiner to a unified block gorup descriptor view. */
     574typedef EXTBLOCKGROUPDESC *PEXTBLOCKGROUPDESC;
     575/** Poiner to a const unified block gorup descriptor view. */
     576typedef const EXTBLOCKGROUPDESC *PCEXTBLOCKGROUPDESC;
    551577
    552578
     
    621647typedef const EXTINODE *PCEXTINODE;
    622648
     649
    623650/**
    624651 * Extra inode data (coming right behind the fixed inode data).
     
    649676/** Pointer to a const extra inode data. */
    650677typedef const EXTINODEEXTRA *PCEXTINODEEXTRA;
     678
     679
     680/**
     681 * Combined inode data.
     682 */
     683typedef struct EXTINODECOMB
     684{
     685    /** Core inode structure. */
     686    EXTINODE      Core;
     687    /** Any extra inode data which might be present. */
     688    EXTINODEEXTRA Extra;
     689} EXTINODECOMB;
     690/** Pointer to combined inode data. */
     691typedef EXTINODECOMB *PEXTINODECOMB;
     692/** Pointer to a const combined inode data. */
     693typedef const EXTINODECOMB *PCEXTINODECOMB;
     694
     695
    651696
    652697/** @name EXT_INODE_MODE_XXX - File mode
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette