2011-09-24 10:33:33 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS DiskPart
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* FILE: base/system/diskpart/help.c
|
2016-10-01 22:58:21 +00:00
|
|
|
* PURPOSE: Manages all the partitions of the OS in an interactive way.
|
2011-09-24 10:33:33 +00:00
|
|
|
* PROGRAMMERS: Lee Schroeder
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "diskpart.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* help_cmdlist():
|
|
|
|
* shows all the available commands and basic descriptions for diskpart
|
|
|
|
*/
|
|
|
|
VOID help_cmdlist(VOID)
|
|
|
|
{
|
2013-05-29 11:40:43 +00:00
|
|
|
PCOMMAND cmdptr;
|
2011-09-24 10:33:33 +00:00
|
|
|
|
2013-05-29 11:40:43 +00:00
|
|
|
/* Print the header information */
|
2016-10-07 22:50:32 +00:00
|
|
|
ConResPuts(StdOut, IDS_APP_HEADER);
|
|
|
|
ConPuts(StdOut, L"\n");
|
2011-09-24 10:33:33 +00:00
|
|
|
|
2016-10-07 22:50:32 +00:00
|
|
|
/* List all the commands and the basic descriptions */
|
|
|
|
for (cmdptr = cmds; cmdptr->name; cmdptr++)
|
|
|
|
ConResPuts(StdOut, cmdptr->help_desc);
|
2011-09-24 10:33:33 +00:00
|
|
|
|
2016-10-07 22:50:32 +00:00
|
|
|
ConPuts(StdOut, L"\n");
|
2011-09-24 10:33:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* help_main(char *arg):
|
|
|
|
* main entry point for the help command. Gives help to users who needs it.
|
|
|
|
*/
|
2013-05-29 11:40:43 +00:00
|
|
|
BOOL help_main(INT argc, LPWSTR *argv)
|
2011-09-24 10:33:33 +00:00
|
|
|
{
|
|
|
|
PCOMMAND cmdptr;
|
|
|
|
|
|
|
|
if (argc == 1)
|
|
|
|
{
|
|
|
|
help_cmdlist();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Scan internal command table */
|
|
|
|
for (cmdptr = cmds; cmdptr->name; cmdptr++)
|
|
|
|
{
|
2016-10-07 22:50:32 +00:00
|
|
|
if (_wcsicmp(argv[1], cmdptr->name) == 0)
|
2011-09-24 10:33:33 +00:00
|
|
|
{
|
2016-10-07 22:50:32 +00:00
|
|
|
ConResPuts(StdOut, cmdptr->help);
|
2011-09-24 10:33:33 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
help_cmdlist();
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|