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

Go to the source code of this file.

Functions

STATIC UINT64 GetLcn (IN OUT RUNLIST *Runlist, IN UINT64 Vcn)
 
STATIC EFI_STATUS ReadClusters (IN RUNLIST *Runlist, IN UINT64 Offset, IN UINTN Length, OUT UINT8 *Dest)
 
EFI_STATUS EFIAPI DiskRead (IN EFI_FS *FileSystem, IN UINT64 Offset, IN UINTN Size, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI ReadMftRecord (IN EFI_NTFS_FILE *File, OUT UINT8 *Buffer, IN UINT64 RecordNumber)
 
EFI_STATUS EFIAPI ReadAttr (IN NTFS_ATTR *Attr, OUT UINT8 *Dest, IN UINT64 Offset, IN UINTN Length)
 
EFI_STATUS EFIAPI ReadData (IN NTFS_ATTR *Attr, IN UINT8 *AttrStart, OUT UINT8 *Dest, IN UINT64 Offset, IN UINTN Length)
 
STATIC UINT64 ReadField (IN CONST UINT8 *Run, IN UINT8 FieldSize, IN BOOLEAN Signed)
 
EFI_STATUS EFIAPI ReadRunListElement (IN OUT RUNLIST *Runlist)
 
CHAR16 * ReadSymlink (IN NTFS_FILE *File)
 

Variables

UINT64 mUnitSize
 

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

Function Documentation

◆ DiskRead()

EFI_STATUS EFIAPI DiskRead ( IN EFI_FS * FileSystem,
IN UINT64 Offset,
IN UINTN Size,
IN OUT VOID * Buffer )

Definition at line 116 of file Data.c.

◆ GetLcn()

STATIC UINT64 GetLcn ( IN OUT RUNLIST * Runlist,
IN UINT64 Vcn )

Definition at line 16 of file Data.c.

◆ ReadAttr()

EFI_STATUS EFIAPI ReadAttr ( IN NTFS_ATTR * Attr,
OUT UINT8 * Dest,
IN UINT64 Offset,
IN UINTN Length )

Definition at line 184 of file Data.c.

◆ ReadClusters()

STATIC EFI_STATUS ReadClusters ( IN RUNLIST * Runlist,
IN UINT64 Offset,
IN UINTN Length,
OUT UINT8 * Dest )

Definition at line 42 of file Data.c.

◆ ReadData()

EFI_STATUS EFIAPI ReadData ( IN NTFS_ATTR * Attr,
IN UINT8 * AttrStart,
OUT UINT8 * Dest,
IN UINT64 Offset,
IN UINTN Length )

Definition at line 258 of file Data.c.

◆ ReadField()

STATIC UINT64 ReadField ( IN CONST UINT8 * Run,
IN UINT8 FieldSize,
IN BOOLEAN Signed )

Definition at line 431 of file Data.c.

◆ ReadMftRecord()

EFI_STATUS EFIAPI ReadMftRecord ( IN EFI_NTFS_FILE * File,
OUT UINT8 * Buffer,
IN UINT64 RecordNumber )

Definition at line 148 of file Data.c.

◆ ReadRunListElement()

EFI_STATUS EFIAPI ReadRunListElement ( IN OUT RUNLIST * Runlist)

Table 4.10. Layout of a Data Run


Offset | Size | Description

0 | 0.5 | F=Size of the Offset field 0.5 | 0.5 | L=Size of the Length field 1 | L | Length of the run

1+L | F | Offset to the starting LCN of the previous element (signed)

Definition at line 468 of file Data.c.

◆ ReadSymlink()

CHAR16 * ReadSymlink ( IN NTFS_FILE * File)

Definition at line 565 of file Data.c.

Variable Documentation

◆ mUnitSize

UINT64 mUnitSize

Definition at line 12 of file Data.c.