summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/FSKit/HPFS.h
blob: ef1b4ad07d865d2a67dbf22242d6e81a22225c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -------------------------------------------

	Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.

------------------------------------------- */

#pragma once

#include <NewKit/Defines.h>

/// @file HPFS.h
/// @brief HPFS filesystem support.

#define kHPFSVersion  (0x0100)
#define kHPFSMagic	  "  HPFS"
#define kHPFSMagicLen (8)

#define kHPFSFileNameLen (255)
#define kHPFSPartNameLen (255)

#define kHPFSMinimumDiskSize (gib_cast(64))

enum
{
	kHPFSInvalidDrive,
	kHPFSHDDDrive,
	kHPFSSSDDrive,
	kHPFSMassStorageDrive,
	kHPFSSCSIDrive,
	kHPFSDriveCount,
};

struct HPFS_BOOT_NODE;

struct HPFS_BOOT_NODE final
{
	NeOS::Char	 fMagic[kHPFSMagicLen];
	NeOS::Char	 fPartName[kHPFSPartNameLen];
	NeOS::UInt32 fVersion;
	NeOS::UInt64 fBadSectors;
	NeOS::UInt64 fSectorCount;
	NeOS::UInt64 fSectorSize;
	NeOS::UInt32 fChecksum;
	NeOS::UInt8	 fDriveKind;
	NeOS::UInt8	 fTextEncoding;
	NeOS::UInt64 fRootINode;
	NeOS::UInt64 fRecoveryINode;
};

struct HPFS_INDEX_NODE
{
	NeOS::Char	 fName[kHPFSFileNameLen];
	NeOS::UInt32 fFlags;
	NeOS::UInt16 fKind;
	NeOS::UInt32 fSize;
	NeOS::Lba	 fFirstINode;
	NeOS::Lba	 fLastINode;
	NeOS::UInt32 fChecksum;
};