[DISKPART] Add dump command to dump a sector of a disk or partition

Select a disk and run "dump disk 0" to dump the MBR of the disk.
This commit is contained in:
Eric Kohl 2022-03-13 14:20:47 +01:00
parent af33607a27
commit 28d565ae9a
3 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,7 @@ list(APPEND SOURCE
detach.c
detail.c
diskpart.c
dump.c
expand.c
extend.c
filesystems.c

View File

@ -225,6 +225,9 @@ BOOL detail_main(INT argc, LPWSTR *argv);
/* diskpart.c */
/* dump.c */
BOOL dump_main(INT argc, LPWSTR *argv);
/* expand.c */
BOOL expand_main(INT argc, LPWSTR *argv);
@ -258,6 +261,11 @@ VOID InterpretMain(VOID);
/* list.c */
BOOL list_main(INT argc, LPWSTR *argv);
ULONGLONG
RoundingDivide(
_In_ ULONGLONG Dividend,
_In_ ULONGLONG Divisor);
/* merge.c */
BOOL merge_main(INT argc, LPWSTR *argv);

View File

@ -29,6 +29,7 @@ COMMAND cmds[] =
{L"delete", delete_main, IDS_HELP_CMD_DELETE, IDS_HELP_CMD_DESC_DELETE},
{L"detail", detail_main, IDS_HELP_CMD_DETAIL, IDS_HELP_CMD_DESC_DETAIL},
{L"detach", detach_main, IDS_HELP_CMD_DETACH, IDS_HELP_CMD_DESC_DETACH},
{L"dump", dump_main, IDS_NONE, IDS_NONE},
{L"exit", NULL, IDS_NONE, IDS_HELP_CMD_DESC_EXIT},
{L"expand", expand_main, IDS_HELP_CMD_EXPAND, IDS_HELP_CMD_DESC_EXPAND},
{L"extend", extend_main, IDS_HELP_CMD_EXTEND, IDS_HELP_CMD_DESC_EXTEND},