XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
ext2.h File Reference
#include <stdint.h>
#include <Fs/vdisk.h>
Include dependency graph for ext2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ext2_sb_
 
struct  _ext2bgdesc_
 
struct  _ext2_inode_
 
struct  _ext2_dir_
 

Macros

#define EXT2_SUPER_BLOCK_MAGIC   0xEF53
 
#define EXT2_DIRECT_BLOCKS   12
 
#define EXT2_S_IFSOCK   0xC000
 
#define EXT2_S_IFLNK   0xA000
 
#define EXT2_S_IFREG   0x8000
 
#define EXT2_S_IFBLK   0x6000
 
#define EXT2_S_IFDIR   0x4000
 
#define EXT2_S_IFCHR   0x2000
 
#define EXT2_S_IFIFO   0x1000
 
#define EXT2_S_ISUID   0x0800
 
#define EXT2_S_ISGID   0x0400
 
#define EXT2_S_ISVTX   0x0200
 
#define EXT2_S_IRUSR   0x0100
 
#define EXT2_S_IWUSR   0x0080
 
#define EXT2_S_IXUSR   0x0040
 
#define EXT2_S_IRGRP   0x0020
 
#define EXT2_S_IWGRP   0x0010
 
#define EXT2_S_IXGRP   0x0008
 
#define EXT2_S_IROTH   0x0004
 
#define EXT2_S_IWOTH   0x0002
 
#define EXT2_S_IXOTH   0x0001
 
#define EXT2_BGD_BLOCK   2
 
#define E_SUCCESS   0
 
#define E_BADBLOCK   1
 
#define E_NOSPACE   2
 
#define E_BADPARENT   3
 
#define EXT2_FLAG_READWRITE   0x00002
 
#define EXT2_FLAG_LOUD   0x0004
 

Typedefs

typedef struct _ext2_sb_ Ext2Superblock
 
typedef struct _ext2bgdesc_ Ext2BlockDescriptor
 
typedef struct _ext2_inode_ Ext2Inode
 
typedef struct _ext2_dir_ Ext2Dir
 

Functions

void Ext2Initialise (AuVDisk *vdisk, char *mountname)
 

Macro Definition Documentation

◆ E_BADBLOCK

#define E_BADBLOCK   1

◆ E_BADPARENT

#define E_BADPARENT   3

◆ E_NOSPACE

#define E_NOSPACE   2

◆ E_SUCCESS

#define E_SUCCESS   0

◆ EXT2_BGD_BLOCK

#define EXT2_BGD_BLOCK   2

◆ EXT2_DIRECT_BLOCKS

#define EXT2_DIRECT_BLOCKS   12

◆ EXT2_FLAG_LOUD

#define EXT2_FLAG_LOUD   0x0004

◆ EXT2_FLAG_READWRITE

#define EXT2_FLAG_READWRITE   0x00002

◆ EXT2_S_IFBLK

#define EXT2_S_IFBLK   0x6000

◆ EXT2_S_IFCHR

#define EXT2_S_IFCHR   0x2000

◆ EXT2_S_IFDIR

#define EXT2_S_IFDIR   0x4000

◆ EXT2_S_IFIFO

#define EXT2_S_IFIFO   0x1000

◆ EXT2_S_IFLNK

#define EXT2_S_IFLNK   0xA000

◆ EXT2_S_IFREG

#define EXT2_S_IFREG   0x8000

◆ EXT2_S_IFSOCK

#define EXT2_S_IFSOCK   0xC000

◆ EXT2_S_IRGRP

#define EXT2_S_IRGRP   0x0020

◆ EXT2_S_IROTH

#define EXT2_S_IROTH   0x0004

◆ EXT2_S_IRUSR

#define EXT2_S_IRUSR   0x0100

◆ EXT2_S_ISGID

#define EXT2_S_ISGID   0x0400

◆ EXT2_S_ISUID

#define EXT2_S_ISUID   0x0800

◆ EXT2_S_ISVTX

#define EXT2_S_ISVTX   0x0200

◆ EXT2_S_IWGRP

#define EXT2_S_IWGRP   0x0010

◆ EXT2_S_IWOTH

#define EXT2_S_IWOTH   0x0002

◆ EXT2_S_IWUSR

#define EXT2_S_IWUSR   0x0080

◆ EXT2_S_IXGRP

#define EXT2_S_IXGRP   0x0008

◆ EXT2_S_IXOTH

#define EXT2_S_IXOTH   0x0001

◆ EXT2_S_IXUSR

#define EXT2_S_IXUSR   0x0040

◆ EXT2_SUPER_BLOCK_MAGIC

#define EXT2_SUPER_BLOCK_MAGIC   0xEF53

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Typedef Documentation

◆ Ext2BlockDescriptor

◆ Ext2Dir

typedef struct _ext2_dir_ Ext2Dir

◆ Ext2Inode

typedef struct _ext2_inode_ Ext2Inode

◆ Ext2Superblock

typedef struct _ext2_sb_ Ext2Superblock

Function Documentation

◆ Ext2Initialise()

void Ext2Initialise ( AuVDisk vdisk,
char *  mountname 
)
extern

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.