19{
24#if 0
27#endif
31
32 DPRINT1(
"CreateEfiPartition()\n");
33
35 {
38 }
39
41 {
44 }
45
47 {
49 {
50
51 DPRINT(
"NoErr\n", pszSuffix);
53#if 0
55#endif
56 }
57 }
58
60 {
62 {
63
64 DPRINT(
"Size : %s\n", pszSuffix);
65
68 {
71 }
72 }
74 {
75
76 DPRINT(
"Offset : %s\n", pszSuffix);
78#if 0
81 {
84 }
85#endif
86 }
88 {
89
90 }
91 else
92 {
95 }
96 }
97
98 DPRINT1(
"Size: %I64u\n", ullSize);
99#if 0
100 DPRINT1(
"Offset: %I64u\n", ullOffset);
101#endif
102
103
104 if (ullSize != 0)
106 else
107 ullSectorCount = 0;
108
109 DPRINT1(
"SectorCount: %I64u\n", ullSectorCount);
110
111#ifdef DUMP_PARTITION_LIST
113#endif
114
117 ListEntry = ListEntry->
Flink)
118 {
121 continue;
122
123 if (ullSectorCount == 0)
124 {
125 DPRINT(
"Claim whole unused space!\n");
134
137 break;
138 }
139 else
140 {
142 {
143 DPRINT(
"Claim matching unused space!\n");
152
155 break;
156 }
157 else if (ullSectorCount < PartEntry->
SectorCount.QuadPart)
158 {
159 DPRINT(
"Claim part of unused space\n");
161 if (NewPartEntry ==
NULL)
162 {
165 }
166
168
171
181
184
186
189 break;
190 }
191 }
192 }
193
194#ifdef DUMP_PARTITION_LIST
196#endif
197
201 {
205 }
206
208
210}
void ConPuts(FILE *fp, LPCWSTR psz)
void ConResPuts(FILE *fp, UINT nID)
#define IDS_CREATE_PARTITION_INVALID_STYLE
#define IDS_CREATE_PARTITION_FAIL
#define IDS_ERROR_INVALID_ARGS
#define IDS_SELECT_NO_DISK
#define IDS_CREATE_PARTITION_SUCCESS
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
VOID CreateGUID(_Out_ GUID *pGuid)
BOOL HasPrefix(_In_ PWSTR pszString, _In_ PWSTR pszPrefix, _Out_opt_ PWSTR *pszSuffix)
VOID UpdateGptDiskLayout(_In_ PDISKENTRY DiskEntry, _In_ BOOL DeleteEntry)
NTSTATUS WriteGptPartitions(_In_ PDISKENTRY DiskEntry)
#define NT_SUCCESS(StatCode)
_ACRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
#define InsertTailList(ListHead, Entry)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LIST_ENTRY PrimaryPartListHead
struct _LIST_ENTRY * Flink
ULARGE_INTEGER SectorCount
struct _DISKENTRY * DiskEntry
ULARGE_INTEGER StartSector
#define CONTAINING_RECORD(address, type, field)
static PPARTENTRY CurrentPartition