43 DPRINT(
"Size : %s\n", pszSuffix);
55 DPRINT(
"Offset : %s\n", pszSuffix);
69 DPRINT(
"Align : %s\n", pszSuffix);
78 DPRINT(
"NoErr\n", pszSuffix);
91 DPRINT1(
"Size: %I64u\n", ullSize);
93 DPRINT1(
"Offset: %I64u\n", ullOffset);
104 ConPuts(
StdOut,
L"We already have an extended partition on this disk!\n");
113 DPRINT1(
"SectorCount: %I64u\n", ullSectorCount);
120 ConPuts(
StdOut,
L"No disk space left for an extended partition!\n");
124 if (ullSectorCount == 0)
151 if (NewPartEntry ==
NULL)
223 DPRINT(
"Size : %s\n", pszSuffix);
235 DPRINT(
"Offset : %s\n", pszSuffix);
249 DPRINT(
"Id : %s\n", pszSuffix);
277 DPRINT(
"Align : %s\n", pszSuffix);
286 DPRINT(
"NoErr\n", pszSuffix);
299 DPRINT1(
"Size: %I64u\n", ullSize);
301 DPRINT1(
"Offset: %I64u\n", ullOffset);
310 DPRINT1(
"SectorCount: %I64u\n", ullSectorCount);
314 ListEntry = ListEntry->
Flink)
320 if (ullSectorCount == 0)
349 if (NewPartEntry ==
NULL)
423 DPRINT(
"Size : %s\n", pszSuffix);
435 DPRINT(
"Offset : %s\n", pszSuffix);
449 DPRINT(
"Id : %s\n", pszSuffix);
477 DPRINT(
"Align : %s\n", pszSuffix);
486 DPRINT(
"NoErr\n", pszSuffix);
499 DPRINT1(
"Size: %I64u\n", ullSize);
501 DPRINT1(
"Offset: %I64u\n", ullOffset);
507 ConPuts(
StdOut,
L"No space left for another primary partition!\n");
516 DPRINT1(
"SectorCount: %I64u\n", ullSectorCount);
520 ListEntry = ListEntry->
Flink)
526 if (ullSectorCount == 0)
555 if (NewPartEntry ==
NULL)
void ConPuts(FILE *fp, LPCWSTR psz)
void ConResPuts(FILE *fp, UINT nID)
BOOL CreateLogicalPartition(_In_ INT argc, _In_ PWSTR *argv)
BOOL CreateExtendedPartition(_In_ INT argc, _In_ PWSTR *argv)
BOOL CreatePrimaryPartition(_In_ INT argc, _In_ PWSTR *argv)
#define IDS_CREATE_PARTITION_FAIL
#define IDS_ERROR_INVALID_ARGS
#define IDS_SELECT_NO_DISK
#define IDS_CREATE_PARTITION_SUCCESS
#define PARTITION_EXTENDED
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOL HasPrefix(_In_ PWSTR pszString, _In_ PWSTR pszPrefix, _Out_opt_ PWSTR *pszSuffix)
#define NT_SUCCESS(StatCode)
#define InsertTailList(ListHead, Entry)
GLuint GLsizei GLsizei * length
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
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static VOID UpdateDiskLayout(IN PDISKENTRY DiskEntry)
#define GetPrimaryPartitionCount(DiskEntry)
NTSTATUS WritePartitions(IN PDISKENTRY DiskEntry)
PPARTENTRY ExtendedPartition
LIST_ENTRY LogicalPartListHead
LIST_ENTRY PrimaryPartListHead
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
ULARGE_INTEGER SectorCount
struct _DISKENTRY * DiskEntry
ULARGE_INTEGER StartSector
#define CONTAINING_RECORD(address, type, field)
static PPARTENTRY CurrentPartition
unsigned __int64 CDECL _wcstoui64(const wchar_t *nptr, wchar_t **endptr, int base)