OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
Index.c File Reference
#include "NTFS.h"
#include "Helper.h"

Go to the source code of this file.

Functions

STATIC VOID FreeNode (IN OUT NTFS_FILE *Node OPTIONAL, IN FSHELP_CTX *Context)
 
STATIC VOID PopElement (IN OUT FSHELP_CTX *Context)
 
STATIC VOID FreeStack (IN OUT FSHELP_CTX *Context)
 
STATIC VOID GoUpALevel (IN OUT FSHELP_CTX *Context)
 
STATIC EFI_STATUS PushNode (IN OUT FSHELP_CTX *Context, IN NTFS_FILE *Node, IN FSHELP_FILETYPE FileType)
 
STATIC EFI_STATUS GoToRoot (IN OUT FSHELP_CTX *Context)
 
STATIC EFI_STATUS FindFileIter (IN CHAR16 *Name, IN FSHELP_FILETYPE FileType, IN NTFS_FILE *Node, IN FSHELP_ITER_CTX *Context)
 
STATIC EFI_STATUS NtfsDirHook (IN CHAR16 *Name, IN FSHELP_FILETYPE FileType, IN NTFS_FILE *Node, IN OUT EFI_FILE_INFO *Info)
 
STATIC EFI_STATUS NtfsDirIter (IN CHAR16 *FileName, IN FSHELP_FILETYPE FileType, IN NTFS_FILE *Node, IN EFI_NTFS_FILE *File)
 
STATIC EFI_STATUS ListFile (IN NTFS_FILE *Dir, IN UINT8 *Position, OUT VOID *FileOrCtx, IN FUNCTION_TYPE FunctionType)
 
STATIC EFI_STATUS FindFile (IN CHAR16 *CurrentPath, IN FSHELP_CTX *Context)
 
EFI_STATUS FsHelpFindFile (IN CONST CHAR16 *Path, IN NTFS_FILE *RootNode, OUT NTFS_FILE **FoundNode, IN FSHELP_FILETYPE Type)
 
EFI_STATUS IterateDir (IN NTFS_FILE *Dir, IN VOID *FileOrCtx, IN FUNCTION_TYPE FunctionType)
 
EFI_STATUS RelativeToAbsolute (OUT CHAR16 *Dest, IN CHAR16 *Source)
 
VOID NtfsToEfiTime (EFI_TIME *EfiTime, UINT64 NtfsTime)
 

Variables

STATIC UINT64 mBufferSize
 
STATIC UINT8 mDaysPerMonth [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0 }
 
INT64 mIndexCounter
 

Detailed Description

Copyright (c) 2022, Mikhail Krichanov. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

Functional and structural descriptions follow NTFS Documentation by Richard Russon and Yuval Fledel

Definition in file Index.c.

Function Documentation

◆ FindFile()

STATIC EFI_STATUS FindFile ( IN CHAR16 * CurrentPath,
IN FSHELP_CTX * Context )

Definition at line 359 of file Index.c.

◆ FindFileIter()

STATIC EFI_STATUS FindFileIter ( IN CHAR16 * Name,
IN FSHELP_FILETYPE FileType,
IN NTFS_FILE * Node,
IN FSHELP_ITER_CTX * Context )

Definition at line 117 of file Index.c.

◆ FreeNode()

STATIC VOID FreeNode ( IN OUT NTFS_FILE *Node OPTIONAL,
IN FSHELP_CTX * Context )

Definition at line 18 of file Index.c.

◆ FreeStack()

STATIC VOID FreeStack ( IN OUT FSHELP_CTX * Context)

Definition at line 51 of file Index.c.

◆ FsHelpFindFile()

EFI_STATUS FsHelpFindFile ( IN CONST CHAR16 * Path,
IN NTFS_FILE * RootNode,
OUT NTFS_FILE ** FoundNode,
IN FSHELP_FILETYPE Type )

Definition at line 471 of file Index.c.

◆ GoToRoot()

STATIC EFI_STATUS GoToRoot ( IN OUT FSHELP_CTX * Context)

Definition at line 105 of file Index.c.

◆ GoUpALevel()

STATIC VOID GoUpALevel ( IN OUT FSHELP_CTX * Context)

Definition at line 64 of file Index.c.

◆ IterateDir()

EFI_STATUS IterateDir ( IN NTFS_FILE * Dir,
IN VOID * FileOrCtx,
IN FUNCTION_TYPE FunctionType )

Definition at line 534 of file Index.c.

◆ ListFile()

STATIC EFI_STATUS ListFile ( IN NTFS_FILE * Dir,
IN UINT8 * Position,
OUT VOID * FileOrCtx,
IN FUNCTION_TYPE FunctionType )

Definition at line 234 of file Index.c.

◆ NtfsDirHook()

STATIC EFI_STATUS NtfsDirHook ( IN CHAR16 * Name,
IN FSHELP_FILETYPE FileType,
IN NTFS_FILE * Node,
IN OUT EFI_FILE_INFO * Info )

Definition at line 154 of file Index.c.

◆ NtfsDirIter()

STATIC EFI_STATUS NtfsDirIter ( IN CHAR16 * FileName,
IN FSHELP_FILETYPE FileType,
IN NTFS_FILE * Node,
IN EFI_NTFS_FILE * File )

Definition at line 210 of file Index.c.

◆ NtfsToEfiTime()

VOID NtfsToEfiTime ( EFI_TIME * EfiTime,
UINT64 NtfsTime )

NTFS Time is the number of 100ns units since Jan 1, 1601. The signifigance of this date is that it is the beginning of the first full century of the Gregorian Calendar. The time displayed in Shell will only match the time displayed in Windows if the Windows time zone is set to Coordinated Universal Time (UTC). Otherwise, it will be skewed by the time zone setting.

Definition at line 928 of file Index.c.

◆ PopElement()

STATIC VOID PopElement ( IN OUT FSHELP_CTX * Context)

Definition at line 33 of file Index.c.

◆ PushNode()

STATIC EFI_STATUS PushNode ( IN OUT FSHELP_CTX * Context,
IN NTFS_FILE * Node,
IN FSHELP_FILETYPE FileType )

Definition at line 79 of file Index.c.

◆ RelativeToAbsolute()

EFI_STATUS RelativeToAbsolute ( OUT CHAR16 * Dest,
IN CHAR16 * Source )

Definition at line 826 of file Index.c.

Variable Documentation

◆ mBufferSize

STATIC UINT64 mBufferSize

Definition at line 12 of file Index.c.

◆ mDaysPerMonth

STATIC UINT8 mDaysPerMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0 }

Definition at line 13 of file Index.c.

◆ mIndexCounter

INT64 mIndexCounter

Definition at line 14 of file Index.c.