156 (*arg)[++(*ac)] =
NULL;
199 bQuoted ^= (*
s ==
'\"');
285 CONSOLE_ConOutPrintf(
"%04lx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx\n",
380 swprintf(DriveName,
L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
415 DPRINT1(
"NtDeviceIoControlFile failed (Status 0x%08lx)\n",
Status);
419 DPRINT1(
"Drive number: %lu\n", ulDrive);
420 DPRINT1(
"Cylinders: %I64u\nMediaType: %x\nTracksPerCylinder: %lu\n"
421 "SectorsPerTrack: %lu\nBytesPerSector: %lu\n\n",
442 DPRINT1(
"Buffer allocation failed\n");
606 swprintf(DriveName,
L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
641 DPRINT1(
"NtDeviceIoControlFile failed (Status 0x%08lx)\n",
Status);
647 "SectorsPerTrack: %lu\nBytesPerSector: %lu\n\n",
657 if (LayoutBuffer ==
NULL)
659 DPRINT1(
"LayoutBuffer allocation failed\n");
675 DPRINT1(
"NtDeviceIoControlFile(IOCTL_DISK_GET_DRIVE_LAYOUT) failed (Status 0x%08lx)\n",
Status);
703 if (LayoutBuffer !=
NULL)
752#ifdef FEATURE_HISTORY
777#ifdef FEATURE_HISTORY
818 if (
current > 0 && charcount > 0)
835 curx =
State->maxx - 1;
851 curx =
State->maxx - 1;
870 if (
current != charcount && charcount > 0)
915#ifdef FEATURE_HISTORY
920 str[charcount] =
'\0';
933#ifdef FEATURE_HISTORY
938#ifdef FEATURE_HISTORY
943 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
944 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
951#ifdef FEATURE_HISTORY
956 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
957 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
971 curx =
State->maxx - 1;
999#ifdef FEATURE_HISTORY
1022 if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
1030 if ((tempscreen %
State->maxx) == (
State->maxx - 1) &&
1031 (tempscreen /
State->maxx) + cury == (
State->maxy - 1))
1040 if (curx ==
State->maxx - 1)
1076 return (
c ==
'/' ||
c ==
'=' ||
c ==
'\0' ||
isspace(
c));
1116 for (cmdptr =
Commands; ; cmdptr++)
1145 (
strchr(
"\\.-", *(com + cl))))
1162 CHAR szInputBuffer[256];
1179 while (!
State.bExit)
1185DPRINT1(
"%s\n", szInputBuffer);
int strcmp(const char *String1, const char *String2)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
__int64 CDECL _atoi64(const char *nptr)
#define FILE_NON_DIRECTORY_FILE
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
VOID GetCursorXY(PSHORT x, PSHORT y)
#define ConOutPrintf(szStr,...)
VOID History_move_to_bottom(VOID)
VOID History(INT dir, LPTSTR commandline)
VOID History_del_current_entry(LPTSTR str)
LPCTSTR PeekHistory(INT dir)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
static INT CommandDumpSector(PCONSOLE_STATE State, LPSTR param)
struct _CONSOLE_STATE * PCONSOLE_STATE
static VOID HelpHelp(VOID)
void HexDump(PUCHAR buffer, ULONG size)
static VOID StripQuotes(LPSTR in)
static VOID HelpDumpSector(VOID)
static VOID ClearCommandLine(LPSTR str, INT maxlen, SHORT orgx, SHORT orgy)
VOID RecoveryConsole(VOID)
static VOID HelpCls(VOID)
struct _CONSOLE_STATE CONSOLE_STATE
static INT CommandHelp(PCONSOLE_STATE State, LPSTR param)
static VOID HelpExit(VOID)
static VOID freep(LPSTR *p)
static BOOL ReadCommand(PCONSOLE_STATE State, LPSTR str, INT maxlen)
static VOID DoCommand(PCONSOLE_STATE State, LPSTR line)
static BOOL IsDelimiter(CHAR c)
struct tagCOMMAND * LPCOMMAND
static INT CommandCls(PCONSOLE_STATE State, LPSTR param)
static INT CommandExit(PCONSOLE_STATE State, LPSTR param)
BOOL add_entry(LPINT ac, LPSTR **arg, LPCSTR entry)
static INT CommandPartInfo(PCONSOLE_STATE State, LPSTR param)
static LPSTR * split(LPSTR s, LPINT args)
struct tagCOMMAND COMMAND
static VOID HelpPartInfo(VOID)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
VOID __cdecl CONSOLE_ConOutPrintf(IN LPCSTR szFormat,...)
SHORT CONSOLE_GetCursorY(VOID)
VOID CONSOLE_SetCursorXY(IN SHORT x, IN SHORT y)
VOID CONSOLE_GetCursorXY(OUT PSHORT x, OUT PSHORT y)
VOID CONSOLE_ConInKey(OUT PINPUT_RECORD Buffer)
SHORT CONSOLE_GetCursorX(VOID)
VOID CONSOLE_ClearScreen(VOID)
VOID CONSOLE_SetCursorType(IN BOOL bInsert, IN BOOL bVisible)
VOID CONSOLE_ConOutPuts(IN LPCSTR szText)
VOID CONSOLE_ConOutChar(IN CHAR c)
#define NT_SUCCESS(StatCode)
#define FILE_SYNCHRONOUS_IO_NONALERT
#define FILE_RANDOM_ACCESS
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble q
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_ _CRTIMP int __cdecl iscntrl(_In_ int _C)
#define OBJ_CASE_INSENSITIVE
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
#define memcpy(s1, s2, n)
struct task_struct * current
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define IOCTL_DISK_GET_DRIVE_LAYOUT
_In_ ULONG _In_ ULONG Offset
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
union _KEY_EVENT_RECORD::@3285 uChar
INT(* func)(PCONSOLE_STATE, LPSTR)
#define STD_OUTPUT_HANDLE
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo