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

Go to the source code of this file.

Functions

EFI_STATUS NtfsDir (IN EFI_FS *FileSystem, IN CONST CHAR16 *Path, OUT EFI_NTFS_FILE *File, IN FUNCTION_TYPE FunctionType)
 
EFI_STATUS NtfsOpen (IN EFI_NTFS_FILE *File)
 
EFI_STATUS NtfsMount (IN EFI_FS *FileSystem)
 
EFI_STATUS EFIAPI Fixup (IN UINT8 *Buffer, IN UINT64 Length, IN UINT32 Magic, IN UINTN SectorSize)
 
EFI_STATUS InitAttr (OUT NTFS_ATTR *Attr, IN NTFS_FILE *File)
 
UINT8 * LocateAttr (IN NTFS_ATTR *Attr, IN NTFS_FILE *Mft, IN UINT32 Type)
 
UINT8 * FindAttr (IN NTFS_ATTR *Attr, IN UINT32 Type)
 
EFI_STATUS EFIAPI InitFile (IN OUT NTFS_FILE *File, IN UINT64 RecordNumber)
 
VOID FreeAttr (IN NTFS_ATTR *Attr)
 
VOID FreeFile (IN NTFS_FILE *File)
 

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 Disc.c.

Function Documentation

◆ FindAttr()

UINT8 * FindAttr ( IN NTFS_ATTR * Attr,
IN UINT32 Type )

Definition at line 400 of file Disc.c.

◆ Fixup()

EFI_STATUS EFIAPI Fixup ( IN UINT8 * Buffer,
IN UINT64 Length,
IN UINT32 Magic,
IN UINTN SectorSize )

Table 4.21. Layout of a File Record


Offset | Size | Description

0x00 | 4 | Magic number 'FILE' 0x04 | 2 | Offset to the update sequence 0x06 | 2 | Size in words of Update Sequence Number & Array (S) ... | 2 | Update Sequence Number (a)

| 2S-2 | Update Sequence Array (a)

Definition at line 242 of file Disc.c.

◆ FreeAttr()

VOID FreeAttr ( IN NTFS_ATTR * Attr)

Definition at line 792 of file Disc.c.

◆ FreeFile()

VOID FreeFile ( IN NTFS_FILE * File)

Definition at line 810 of file Disc.c.

◆ InitAttr()

EFI_STATUS InitAttr ( OUT NTFS_ATTR * Attr,
IN NTFS_FILE * File )

Definition at line 313 of file Disc.c.

◆ InitFile()

EFI_STATUS EFIAPI InitFile ( IN OUT NTFS_FILE * File,
IN UINT64 RecordNumber )

Definition at line 727 of file Disc.c.

◆ LocateAttr()

UINT8 * LocateAttr ( IN NTFS_ATTR * Attr,
IN NTFS_FILE * Mft,
IN UINT32 Type )

Definition at line 347 of file Disc.c.

◆ NtfsDir()

EFI_STATUS NtfsDir ( IN EFI_FS * FileSystem,
IN CONST CHAR16 * Path,
OUT EFI_NTFS_FILE * File,
IN FUNCTION_TYPE FunctionType )

Definition at line 13 of file Disc.c.

◆ NtfsMount()

EFI_STATUS NtfsMount ( IN EFI_FS * FileSystem)

Definition at line 94 of file Disc.c.

◆ NtfsOpen()

EFI_STATUS NtfsOpen ( IN EFI_NTFS_FILE * File)

Definition at line 53 of file Disc.c.