VirtualBox

Changeset 76216 in vbox for trunk/include


Ignore:
Timestamp:
Dec 13, 2018 7:26:25 PM (6 years ago)
Author:
vboxsync
Message:

Runtime/fs: Started restructurin the ext2 filesystem code to indicate that it will be used for ext3/ext4 later on

Location:
trunk/include/iprt
Files:
1 edited
1 moved

Legend:

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

    r76215 r76216  
    11/* $Id$ */
    22/** @file
    3  * IPRT Filesystem API (FileSys) - ext2/3 format.
     3 * IPRT, Ext2/3/4 format.
    44 */
    55
    66/*
    7  * Copyright (C) 2012-2017 Oracle Corporation
     7 * Copyright (C) 2012-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2525 */
    2626
    27 #ifndef ___iprt_formats_ext2_h
    28 #define ___iprt_formats_ext2_h
     27#ifndef ___iprt_formats_ext_h
     28#define ___iprt_formats_ext_h
    2929
    3030#include <iprt/types.h>
     
    3333
    3434/*
    35  * The filesystem structures are from http://wiki.osdev.org/Ext2 and
    36  * http://www.nongnu.org/ext2-doc/ext2.html
     35 * The filesystem structures were retrieved from:
     36 * https://www.kernel.org/doc/html/latest/filesystems/ext4/index.html
    3737 */
    3838
    3939/**
    40  * Ext2 superblock.
     40 * Ext superblock.
    4141 *
    4242 * Everything is stored little endian on the disk.
    4343 */
    44 typedef struct EXT2SUPERBLOCK
     44typedef struct EXTSUPERBLOCK
    4545{
    4646    /** Total number of inodes in the filesystem. */
     
    9696    /** Reserved fields. */
    9797    uint8_t     abReserved[940];
    98 } EXT2SUPERBLOCK;
    99 AssertCompileSize(EXT2SUPERBLOCK, 1024);
    100 /** Pointer to an ext2 super block. */
    101 typedef EXT2SUPERBLOCK *PEXT2SUPERBLOCK;
    102 /** Pointer to a const ext2 super block. */
    103 typedef EXT2SUPERBLOCK const *PCEXT2SUPERBLOCK;
     98} EXTSUPERBLOCK;
     99AssertCompileSize(EXTSUPERBLOCK, 1024);
     100/** Pointer to an ext super block. */
     101typedef EXTSUPERBLOCK *PEXTSUPERBLOCK;
     102/** Pointer to a const ext super block. */
     103typedef EXTSUPERBLOCK const *PCEXTSUPERBLOCK;
    104104
    105 /** Ext2 signature. */
    106 #define EXT2_SIGNATURE      UINT16_C(0xef53)
     105/** Ext signature. */
     106#define EXT_SIGNATURE      UINT16_C(0xef53)
    107107/** Clean filesystem state. */
    108 #define EXT2_STATE_CLEAN    UINT16_C(0x0001)
     108#define EXT_STATE_CLEAN    UINT16_C(0x0001)
    109109/** Error filesystem state. */
    110 #define EXT2_STATE_ERRORS   UINT16_C(0x0002)
     110#define EXT_STATE_ERRORS   UINT16_C(0x0002)
    111111
    112112/**
    113113 * Block group descriptor.
    114114 */
    115 typedef struct EXT2BLOCKGROUPDESC
     115typedef struct EXTBLOCKGROUPDESC
    116116{
    117117    /** Block address of the block bitmap. */
     
    131131    /** Reserved. */
    132132    uint8_t     abReserved[12];
    133 } EXT2BLOCKGROUPDESC;
    134 AssertCompileSize(EXT2BLOCKGROUPDESC, 32);
     133} EXTBLOCKGROUPDESC;
     134AssertCompileSize(EXTBLOCKGROUPDESC, 32);
    135135/** Pointer to an ext block group descriptor. */
    136 typedef EXT2BLOCKGROUPDESC *PEXT2BLOCKGROUPDESC;
     136typedef EXTBLOCKGROUPDESC *PEXTBLOCKGROUPDESC;
    137137
    138138#endif
  • trunk/include/iprt/mangling.h

    r76096 r76216  
    965965# define RTFsQueryType                                  RT_MANGLER(RTFsQueryType)
    966966# define RTFsTypeName                                   RT_MANGLER(RTFsTypeName)
    967 # define RTFsExt2VolOpen                                RT_MANGLER(RTFsExt2VolOpen)
     967# define RTFsExtVolOpen                                 RT_MANGLER(RTFsExtVolOpen)
    968968# define RTFsFatVolOpen                                 RT_MANGLER(RTFsFatVolOpen)
    969969# define RTFsFatVolFormat                               RT_MANGLER(RTFsFatVolFormat)
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