https://git.reactos.org/?p=reactos.git;a=commitdiff;h=28d565ae9af8cd81e3f9fa...
commit 28d565ae9af8cd81e3f9fa524af56c9cf6f10c6e Author: Eric Kohl eric.kohl@reactos.org AuthorDate: Sun Mar 13 14:20:47 2022 +0100 Commit: Eric Kohl eric.kohl@reactos.org CommitDate: Sun Mar 13 14:20:47 2022 +0100
[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. --- base/system/diskpart/CMakeLists.txt | 1 + base/system/diskpart/diskpart.h | 8 ++++++++ base/system/diskpart/interpreter.c | 1 + 3 files changed, 10 insertions(+)
diff --git a/base/system/diskpart/CMakeLists.txt b/base/system/diskpart/CMakeLists.txt index 7675dad1d83..f9b5bdd5a3f 100644 --- a/base/system/diskpart/CMakeLists.txt +++ b/base/system/diskpart/CMakeLists.txt @@ -17,6 +17,7 @@ list(APPEND SOURCE detach.c detail.c diskpart.c + dump.c expand.c extend.c filesystems.c diff --git a/base/system/diskpart/diskpart.h b/base/system/diskpart/diskpart.h index 9a56e16a018..abfc2213c74 100644 --- a/base/system/diskpart/diskpart.h +++ b/base/system/diskpart/diskpart.h @@ -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);
diff --git a/base/system/diskpart/interpreter.c b/base/system/diskpart/interpreter.c index 59f75570aba..dde15688029 100644 --- a/base/system/diskpart/interpreter.c +++ b/base/system/diskpart/interpreter.c @@ -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},