ReactOS 0.4.17-dev-1133-gc25e4fd
refdata.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS NTFS Format Support Library
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: NTFS hardcoded defaults
5 * COPYRIGHT: Copyright 2026 Justin Miller <justin.miller@reactos.org>
6 */
7
8#ifndef NTFSLIB_REFDATA_H
9#define NTFSLIB_REFDATA_H
10
11#define NTFS_DEFAULT_SD_COUNT 8
12
13/*
14 * This all comes from extraction of a default NTFS disk,
15 * Modern CHKDSKs needs all this extra data even if we don't use it yet so
16 * I've opted to keep this stuff in its own file to de-clutter the PR.
17 */
18static const USHORT DefaultSdLen[NTFS_DEFAULT_SD_COUNT] = { 100, 100, 100, 100, 96, 72, 76, 72 };
19
20static const BYTE DefaultSds[716] = {
21 0x01,0x00,0x04,0x80,0x48,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
22 0x14,0x00,0x00,0x00,0x02,0x00,0x34,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x14,0x00,
23 0x89,0x00,0x12,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
24 0x00,0x00,0x18,0x00,0x89,0x00,0x12,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,
25 0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
26 0x14,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,
27 0x20,0x02,0x00,0x00,0x01,0x00,0x04,0x80,0x48,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
28 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x02,0x00,0x34,0x00,0x02,0x00,0x00,0x00,
29 0x00,0x00,0x14,0x00,0x9F,0x01,0x12,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
30 0x12,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x9F,0x01,0x12,0x00,0x01,0x02,0x00,0x00,
31 0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x01,0x00,0x00,
32 0x00,0x00,0x00,0x05,0x14,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,
33 0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x00,0x04,0x80,0x48,0x00,0x00,0x00,
34 0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x02,0x00,0x34,0x00,
35 0x02,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,
36 0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x89,0x00,0x12,0x00,
37 0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,
38 0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,
39 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x01,0x00,0x04,0x80,
40 0x48,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
41 0x02,0x00,0x34,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0xFF,0x01,0x1F,0x00,
42 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
43 0xA9,0x00,0x12,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,
44 0x20,0x02,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,
45 0x20,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
46 0x01,0x00,0x04,0x80,0x48,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
47 0x14,0x00,0x00,0x00,0x02,0x00,0x34,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x14,0x00,
48 0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
49 0x00,0x00,0x18,0x00,0xA9,0x00,0x12,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,
50 0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
51 0x12,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
52 0x01,0x00,0x04,0x90,0x30,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
53 0x14,0x00,0x00,0x00,0x02,0x00,0x1C,0x00,0x01,0x00,0x00,0x00,0x00,0x03,0x14,0x00,
54 0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
55 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x01,0x01,0x00,0x00,
56 0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x01,0x00,0x04,0x90,0x30,0x00,0x00,0x00,
57 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x02,0x00,0x1C,0x00,
58 0x01,0x00,0x00,0x00,0x00,0x03,0x14,0x00,0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,
59 0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,
60 0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
61 0x12,0x00,0x00,0x00,0x01,0x00,0x04,0x80,0x30,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
62 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x02,0x00,0x1C,0x00,0x01,0x00,0x00,0x00,
63 0x00,0x00,0x14,0x00,0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
64 0x12,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
65 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
66};
67
68static const BYTE RootSdValue[228] = {
69 0x01,0x00,0x04,0x80,0xCC,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
70 0x14,0x00,0x00,0x00,0x02,0x00,0xB8,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
71 0xFF,0x01,0x1F,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,
72 0x20,0x02,0x00,0x00,0x00,0x0B,0x18,0x00,0x00,0x00,0x00,0x10,0x01,0x02,0x00,0x00,
73 0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x00,0x00,0x14,0x00,
74 0xFF,0x01,0x1F,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x12,0x00,0x00,0x00,
75 0x00,0x0B,0x14,0x00,0x00,0x00,0x00,0x10,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
76 0x12,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0xBF,0x01,0x13,0x00,0x01,0x01,0x00,0x00,
77 0x00,0x00,0x00,0x05,0x0B,0x00,0x00,0x00,0x00,0x0B,0x14,0x00,0x00,0x00,0x01,0xE0,
78 0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x0B,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
79 0xA9,0x00,0x12,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,
80 0x21,0x02,0x00,0x00,0x00,0x0B,0x18,0x00,0x00,0x00,0x00,0xA0,0x01,0x02,0x00,0x00,
81 0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x21,0x02,0x00,0x00,0x01,0x01,0x00,0x00,
82 0x00,0x00,0x00,0x05,0x14,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x05,
83 0x14,0x00,0x00,0x00,
84};
85
86static const BYTE TxfDataValue[56] = {
87 0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
88 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
89 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
90 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
91};
92
93static const BYTE TopsData[100] = {
94 0x0A,0x00,0x64,0x00,0x01,0x00,0x00,0x00,0x47,0x7C,0x40,0x0C,0x3F,0x85,0xF1,0x11,
95 0xA4,0x5D,0xF4,0x26,0x79,0x69,0x33,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
96 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
97 0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
98 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
99 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,
100 0xFF,0xFF,0xFF,0xFF,
101};
102
103static const BYTE TxfInfo[56] = {
104 0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
105 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
106 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
107 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
108};
109
110static const BYTE RepairCfg[8] = { 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00 };
111
112static const BYTE SidAdmins[16] = {
113 0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x05,0x20,0x00,0x00,0x00,0x20,0x02,0x00,0x00,
114};
115
116/* $UpCase:$Info = length 0x20 + CRC64 of the Win10 26100 $UpCase table. */
117static const BYTE UpCaseInfo[32] = {
118 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x69,0x1B,0x6B,0x77,0x7E,0xDC,0xDA,
119 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
120};
121
122#endif
unsigned short USHORT
Definition: pedump.c:61
static const BYTE TopsData[100]
Definition: refdata.h:93
static const BYTE TxfDataValue[56]
Definition: refdata.h:86
#define NTFS_DEFAULT_SD_COUNT
Definition: refdata.h:11
static const BYTE UpCaseInfo[32]
Definition: refdata.h:117
static const BYTE RepairCfg[8]
Definition: refdata.h:110
static const BYTE SidAdmins[16]
Definition: refdata.h:112
static const BYTE DefaultSds[716]
Definition: refdata.h:20
static const USHORT DefaultSdLen[NTFS_DEFAULT_SD_COUNT]
Definition: refdata.h:18
static const BYTE RootSdValue[228]
Definition: refdata.h:68
static const BYTE TxfInfo[56]
Definition: refdata.h:103
unsigned char BYTE
Definition: xxhash.c:193