mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
[DISKPART] Improvements to the dump, help and delete commands
- Print help only if a help string exists. - Use the command table for the dump sub commands. - Add sub commands for the delete command.
This commit is contained in:
parent
de972e2bc2
commit
417687e92e
15 changed files with 219 additions and 134 deletions
|
@ -28,7 +28,10 @@ HelpCommandList(VOID)
|
|||
/* List all the commands and the basic descriptions */
|
||||
for (cmdptr = cmds; cmdptr->cmd1; cmdptr++)
|
||||
{
|
||||
if (cmdptr->cmd1 != NULL && cmdptr->cmd2 == NULL && cmdptr->cmd3 == NULL)
|
||||
if ((cmdptr->cmd1 != NULL) &&
|
||||
(cmdptr->cmd2 == NULL) &&
|
||||
(cmdptr->cmd3 == NULL) &&
|
||||
(cmdptr->help != IDS_NONE))
|
||||
{
|
||||
K32LoadStringW(GetModuleHandle(NULL), cmdptr->help, szOutput, ARRAYSIZE(szOutput));
|
||||
ConPrintf(StdOut, szFormat, cmdptr->cmd1, szOutput);
|
||||
|
@ -57,7 +60,10 @@ HelpCommand(
|
|||
{
|
||||
if (pCommand->cmd1 != NULL && pCommand->cmd2 == NULL && pCommand->cmd3 == NULL)
|
||||
{
|
||||
if (wcsicmp(pCommand->cmd1, cmdptr->cmd1) == 0 && cmdptr->cmd2 != NULL && cmdptr->cmd3 == NULL)
|
||||
if ((wcsicmp(pCommand->cmd1, cmdptr->cmd1) == 0) &&
|
||||
(cmdptr->cmd2 != NULL) &&
|
||||
(cmdptr->cmd3 == NULL) &&
|
||||
(cmdptr->help != IDS_NONE))
|
||||
{
|
||||
K32LoadStringW(GetModuleHandle(NULL), cmdptr->help, szOutput, ARRAYSIZE(szOutput));
|
||||
ConPrintf(StdOut, szFormat, cmdptr->cmd2, szOutput);
|
||||
|
@ -68,7 +74,8 @@ HelpCommand(
|
|||
{
|
||||
if ((wcsicmp(pCommand->cmd1, cmdptr->cmd1) == 0) &&
|
||||
(wcsicmp(pCommand->cmd2, cmdptr->cmd2) == 0) &&
|
||||
(cmdptr->cmd3 != NULL))
|
||||
(cmdptr->cmd3 != NULL) &&
|
||||
(cmdptr->help != IDS_NONE))
|
||||
{
|
||||
K32LoadStringW(GetModuleHandle(NULL), cmdptr->help, szOutput, ARRAYSIZE(szOutput));
|
||||
ConPrintf(StdOut, szFormat, cmdptr->cmd3, szOutput);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue