mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[DISKPART]
* Simplified the help system * Removed an unnecessary check in the help system that listed the first help entry 'active' no matter what was entered into the help system, even if the word is not in the list. * Removed exit_main and rem_main functions since it took a little extra processing time and made the code a bit harder to read. Now it determines if the given command is rem or exit first before looking through the entire function list. * Converted WCHAR* to LPWSTR to make it a bit easier to read. * Add a title to the program to make it easier for the user to determine the name of the application currently running, especially if a large script is being used. Patch by Lee Schroeder. Thanks! CORE-7187 #resolve #comment Committed in r79104. svn path=/trunk/; revision=59104
This commit is contained in:
parent
10e6d3b971
commit
e2b784bd7b
43 changed files with 208 additions and 516 deletions
|
@ -41,7 +41,7 @@ add_executable(diskpart
|
|||
diskpart.rc)
|
||||
|
||||
set_module_type(diskpart win32cui UNICODE)
|
||||
add_importlibs(diskpart user32 msvcrt kernel32)
|
||||
add_importlibs(diskpart user32 msvcrt advapi32 kernel32)
|
||||
if(MSVC)
|
||||
add_importlibs(diskpart ntdll)
|
||||
endif()
|
||||
|
|
|
@ -8,18 +8,9 @@
|
|||
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL active_main(INT argc, WCHAR **argv)
|
||||
BOOL active_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
printf("\nActive\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_active():
|
||||
* Shows the description and explains each argument type of the active command
|
||||
*/
|
||||
VOID help_active(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ACTIVE);
|
||||
}
|
||||
|
|
|
@ -8,16 +8,7 @@
|
|||
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL add_main(INT argc, WCHAR **argv)
|
||||
BOOL add_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_add():
|
||||
* Shows the description and explains each argument type of the add command
|
||||
*/
|
||||
VOID help_add(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ADD);
|
||||
}
|
||||
|
|
|
@ -7,16 +7,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL assign_main(INT argc, WCHAR **argv)
|
||||
BOOL assign_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_assign():
|
||||
* Shows the description and explains each argument type of the assign command
|
||||
*/
|
||||
VOID help_assign(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ASSIGN);
|
||||
}
|
||||
|
|
|
@ -7,17 +7,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL attach_main(INT argc, WCHAR **argv)
|
||||
BOOL attach_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* help_attach():
|
||||
* Shows the description and explains each argument type of the attach command
|
||||
*/
|
||||
VOID help_attach(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ATTACH);
|
||||
}
|
||||
}
|
|
@ -7,16 +7,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL attributes_main(INT argc, WCHAR **argv)
|
||||
BOOL attributes_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_attributes():
|
||||
* Shows the description and explains each argument type of the attributes command
|
||||
*/
|
||||
VOID help_attributes(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ATTRIBUTES);
|
||||
}
|
||||
|
|
|
@ -7,17 +7,8 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL automount_main(INT argc, WCHAR **argv)
|
||||
BOOL automount_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
printf("Automount\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_automount():
|
||||
* Shows the description and explains each argument type of the automount command
|
||||
*/
|
||||
VOID help_automount(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_AUTOMOUNT);
|
||||
}
|
||||
|
|
|
@ -8,18 +8,9 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL break_main(INT argc, WCHAR **argv)
|
||||
BOOL break_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
printf("\nTODO: Add code later since Win 7 Home Premium doesn't have this feature.\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_break():
|
||||
* Shows the description and explains each argument type of the break command
|
||||
*/
|
||||
VOID help_break(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_BREAK);
|
||||
}
|
||||
|
|
|
@ -8,17 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL clean_main(INT argc, WCHAR **argv)
|
||||
BOOL clean_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* help_clean():
|
||||
* Shows the description and explains each argument type of the clean command
|
||||
*/
|
||||
VOID help_clean(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_CLEAN);
|
||||
}
|
||||
|
|
|
@ -8,17 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL compact_main(INT argc, WCHAR **argv)
|
||||
BOOL compact_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* help_compact():
|
||||
* Shows the description and explains each argument type of the compact command
|
||||
*/
|
||||
VOID help_compact(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_COMPACT);
|
||||
}
|
||||
|
|
|
@ -8,17 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL convert_main(INT argc, WCHAR **argv)
|
||||
BOOL convert_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* help_convert():
|
||||
* Shows the description and explains each argument type of the convert command
|
||||
*/
|
||||
VOID help_convert(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_CONVERT);
|
||||
}
|
||||
|
|
|
@ -8,17 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL create_main(INT argc, WCHAR **argv)
|
||||
BOOL create_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* help_create():
|
||||
* Shows the description and explains each argument type of the create command
|
||||
*/
|
||||
VOID help_create(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_CREATE);
|
||||
}
|
||||
|
|
|
@ -8,16 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL delete_main(INT argc, WCHAR **argv)
|
||||
BOOL delete_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* help_delete():
|
||||
* Shows the description and explains each argument type of the delete command
|
||||
*/
|
||||
VOID help_delete(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_DELETE);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL detach_main(INT argc, WCHAR **argv)
|
||||
BOOL detach_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_detach(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_DETACH);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL detail_main(INT argc, WCHAR **argv)
|
||||
BOOL detail_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_detail(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_DETAIL);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "diskpart.h"
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
VOID
|
||||
PrintResourceString(INT resID, ...)
|
||||
{
|
||||
|
@ -37,7 +36,9 @@ ShowHeader(VOID)
|
|||
wprintf(L"\n*WARNING*: This program is incomplete and may not work properly.\n");
|
||||
|
||||
/* Print the header information */
|
||||
wprintf(L"\n");
|
||||
PrintResourceString(IDS_APP_HEADER);
|
||||
wprintf(L"\n");
|
||||
PrintResourceString(IDS_APP_LICENSE);
|
||||
PrintResourceString(IDS_APP_CURR_COMPUTER, szComputerName);
|
||||
}
|
||||
|
@ -79,14 +80,21 @@ RunScript(LPCWSTR filename)
|
|||
* wmain():
|
||||
* Main entry point of the application.
|
||||
*/
|
||||
int wmain(int argc, const WCHAR *argv[])
|
||||
int wmain(int argc, const LPWSTR argv[])
|
||||
{
|
||||
LPCWSTR script = NULL;
|
||||
LPCWSTR tmpBuffer = NULL;
|
||||
WCHAR appTitle[50];
|
||||
int index, timeout;
|
||||
|
||||
/* Sets the title of the program so the user will have an easier time
|
||||
determining the current program, especially if diskpart is running a
|
||||
script */
|
||||
LoadStringW(GetModuleHandle(NULL), IDS_APP_HEADER, (LPWSTR)appTitle, 50);
|
||||
SetConsoleTitleW(appTitle);
|
||||
|
||||
/* Sets the timeout value to 0 just in case the user doesn't
|
||||
specify a value. */
|
||||
specify a value */
|
||||
timeout = 0;
|
||||
|
||||
/* If there are no command arguments, then go straight to the interpreter */
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <wincon.h>
|
||||
#include <winuser.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -25,9 +26,10 @@
|
|||
|
||||
typedef struct _COMMAND
|
||||
{
|
||||
WCHAR *name;
|
||||
LPWSTR name;
|
||||
BOOL (*func)(INT, WCHAR**);
|
||||
VOID (*help)(INT, WCHAR**);
|
||||
INT help;
|
||||
INT help_desc;
|
||||
} COMMAND, *PCOMMAND;
|
||||
|
||||
extern COMMAND cmds[];
|
||||
|
@ -40,165 +42,126 @@ extern COMMAND cmds[];
|
|||
#define ERROR_SERVICE 4
|
||||
#define ERROR_SYNTAX 5
|
||||
|
||||
#define DISKPART_VERSION L"0.0.019"
|
||||
|
||||
#define MAX_STRING_SIZE 1024
|
||||
#define MAX_ARGS_COUNT 256
|
||||
|
||||
/* PROTOTYPES *****************************************************************/
|
||||
|
||||
/* active.c */
|
||||
BOOL active_main(INT argc, WCHAR **argv);
|
||||
VOID help_active(INT argc, WCHAR **argv);
|
||||
BOOL active_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* add.c */
|
||||
BOOL add_main(INT argc, WCHAR **argv);
|
||||
VOID help_add(INT argc, WCHAR **argv);
|
||||
BOOL add_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* assign.c */
|
||||
BOOL assign_main(INT argc, WCHAR **argv);
|
||||
VOID help_assign(INT argc, WCHAR **argv);
|
||||
BOOL assign_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* attach.c */
|
||||
BOOL attach_main(INT argc, WCHAR **argv);
|
||||
VOID help_attach(INT argc, WCHAR **argv);
|
||||
BOOL attach_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* attributes.h */
|
||||
VOID help_attributes(INT argc, WCHAR **argv);
|
||||
BOOL attributes_main(INT argc, WCHAR **argv);
|
||||
BOOL attributes_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* automount.c */
|
||||
BOOL automount_main(INT argc, WCHAR **argv);
|
||||
VOID help_automount(INT argc, WCHAR **argv);
|
||||
BOOL automount_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* break.c */
|
||||
BOOL break_main(INT argc, WCHAR **argv);
|
||||
VOID help_break(INT argc, WCHAR **argv);
|
||||
BOOL break_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* clean.c */
|
||||
BOOL clean_main(INT argc, WCHAR **argv);
|
||||
VOID help_clean(INT argc, WCHAR **argv);
|
||||
BOOL clean_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* compact.c */
|
||||
BOOL compact_main(INT argc, WCHAR **argv);
|
||||
VOID help_compact(INT argc, WCHAR **argv);
|
||||
BOOL compact_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* convert.c */
|
||||
BOOL convert_main(INT argc, WCHAR **argv);
|
||||
VOID help_convert(INT argc, WCHAR **argv);
|
||||
BOOL convert_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* create.c */
|
||||
BOOL create_main(INT argc, WCHAR **argv);
|
||||
VOID help_create(INT argc, WCHAR **argv);
|
||||
BOOL create_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* delete.c */
|
||||
BOOL delete_main(INT argc, WCHAR **argv);
|
||||
VOID help_delete(INT argc, WCHAR **argv);
|
||||
BOOL delete_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* detach.c */
|
||||
BOOL detach_main(INT argc, WCHAR **argv);
|
||||
VOID help_detach(INT argc, WCHAR **argv);
|
||||
BOOL detach_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* detail.c */
|
||||
BOOL detail_main(INT argc, WCHAR **argv);
|
||||
VOID help_detail(INT argc, WCHAR **argv);
|
||||
BOOL detail_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* diskpart.c */
|
||||
VOID PrintResourceString(INT resID, ...);
|
||||
|
||||
/* expand.c */
|
||||
BOOL expand_main(INT argc, WCHAR **argv);
|
||||
VOID help_expand(INT argc, WCHAR **argv);
|
||||
BOOL expand_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* extend.c */
|
||||
BOOL extend_main(INT argc, WCHAR **argv);
|
||||
VOID help_extend(INT argc, WCHAR **argv);
|
||||
BOOL extend_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* filesystem.c */
|
||||
BOOL filesystems_main(INT argc, WCHAR **argv);
|
||||
VOID help_filesystems(INT argc, WCHAR **argv);
|
||||
BOOL filesystems_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* format.c */
|
||||
BOOL format_main(INT argc, WCHAR **argv);
|
||||
VOID help_format(INT argc, WCHAR **argv);
|
||||
BOOL format_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* gpt.c */
|
||||
BOOL gpt_main(INT argc, WCHAR **argv);
|
||||
VOID help_gpt(INT argc, WCHAR **argv);
|
||||
BOOL gpt_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* help.c */
|
||||
BOOL help_main(INT argc, WCHAR **argv);
|
||||
VOID help_help(INT argc, WCHAR **argv);
|
||||
BOOL help_main(INT argc, LPWSTR *argv);
|
||||
VOID help_cmdlist(VOID);
|
||||
VOID help_print_noerr(VOID);
|
||||
|
||||
/* import. c */
|
||||
BOOL import_main(INT argc, WCHAR **argv);
|
||||
VOID help_import(INT argc, WCHAR **argv);
|
||||
BOOL import_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* inactive.c */
|
||||
BOOL inactive_main(INT argc, WCHAR **argv);
|
||||
VOID help_inactive(INT argc, WCHAR **argv);
|
||||
BOOL inactive_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* interpreter.c */
|
||||
BOOL InterpretScript(WCHAR *line);
|
||||
BOOL InterpretCmd(INT argc, WCHAR **argv);
|
||||
BOOL InterpretScript(LPWSTR line);
|
||||
BOOL InterpretCmd(INT argc, LPWSTR *argv);
|
||||
VOID InterpretMain(VOID);
|
||||
|
||||
/* list.c */
|
||||
BOOL list_main(INT argc, WCHAR **argv);
|
||||
VOID help_list(INT argc, WCHAR **argv);
|
||||
BOOL list_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* merge.c */
|
||||
BOOL merge_main(INT argc, WCHAR **argv);
|
||||
VOID help_merge(INT argc, WCHAR **argv);
|
||||
BOOL merge_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* offline.c */
|
||||
BOOL offline_main(INT argc, WCHAR **argv);
|
||||
VOID help_offline(INT argc, WCHAR **argv);
|
||||
BOOL offline_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* online.c */
|
||||
BOOL online_main(INT argc, WCHAR **argv);
|
||||
VOID help_online(INT argc, WCHAR **argv);
|
||||
BOOL online_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* recover.c */
|
||||
BOOL recover_main(INT argc, WCHAR **argv);
|
||||
VOID help_recover(INT argc, WCHAR **argv);
|
||||
BOOL recover_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* remove.c */
|
||||
BOOL remove_main(INT argc, WCHAR **argv);
|
||||
VOID help_remove(INT argc, WCHAR **argv);
|
||||
BOOL remove_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* repair.c */
|
||||
BOOL repair_main(INT argc, WCHAR **argv);
|
||||
VOID help_repair(INT argc, WCHAR **argv);
|
||||
BOOL repair_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* rescan.c */
|
||||
BOOL rescan_main(INT argc, WCHAR **argv);
|
||||
VOID help_rescan(INT argc, WCHAR **argv);
|
||||
BOOL rescan_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* retain.c */
|
||||
BOOL retain_main(INT argc, WCHAR **argv);
|
||||
VOID help_retain(INT argc, WCHAR **argv);
|
||||
BOOL retain_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* san.c */
|
||||
BOOL san_main(INT argc, WCHAR **argv);
|
||||
VOID help_san(INT argc, WCHAR **argv);
|
||||
BOOL san_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* select.c */
|
||||
BOOL select_main(INT argc, WCHAR **argv);
|
||||
VOID help_select(INT argc, WCHAR **argv);
|
||||
BOOL select_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* setid.c */
|
||||
BOOL setid_main(INT argc, WCHAR **argv);
|
||||
VOID help_setid(INT argc, WCHAR **argv);
|
||||
BOOL setid_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* shrink.c */
|
||||
BOOL shrink_main(INT argc, WCHAR **argv);
|
||||
VOID help_shrink(INT argc, WCHAR **argv);
|
||||
BOOL shrink_main(INT argc, LPWSTR *argv);
|
||||
|
||||
/* uniqueid.c */
|
||||
BOOL uniqueid_main(INT argc, WCHAR **argv);
|
||||
VOID help_uniqueid(INT argc, WCHAR **argv);
|
||||
BOOL uniqueid_main(INT argc, LPWSTR *argv);
|
||||
|
||||
#endif /* DISKPART_H */
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL expand_main(INT argc, WCHAR **argv)
|
||||
BOOL expand_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_expand(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_EXPAND);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL extend_main(INT argc, WCHAR **argv)
|
||||
BOOL extend_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_extend(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_EXTEND);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL filesystems_main(INT argc, WCHAR **argv)
|
||||
BOOL filesystems_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_filesystems(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_FILESYSTEMS);
|
||||
}
|
||||
|
|
|
@ -3,18 +3,12 @@
|
|||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: base/system/diskpart/format.c
|
||||
* PURPOSE: Manages all the partitions of the OS in
|
||||
* an interactive way
|
||||
* an interactive way
|
||||
* PROGRAMMERS: Lee Schroeder
|
||||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL format_main(INT argc, WCHAR **argv)
|
||||
BOOL format_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_format(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_FORMAT);
|
||||
}
|
||||
|
|
|
@ -8,12 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL gpt_main(INT argc, WCHAR **argv)
|
||||
BOOL gpt_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID help_gpt(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_GPT);
|
||||
}
|
||||
|
|
|
@ -8,70 +8,29 @@
|
|||
|
||||
#include "diskpart.h"
|
||||
|
||||
|
||||
/*
|
||||
* help_cmdlist():
|
||||
* shows all the available commands and basic descriptions for diskpart
|
||||
*/
|
||||
VOID help_cmdlist(VOID)
|
||||
{
|
||||
PCOMMAND cmdptr;
|
||||
|
||||
/* Print the header information */
|
||||
PrintResourceString(IDS_APP_HEADER, DISKPART_VERSION);
|
||||
PrintResourceString(IDS_APP_HEADER);
|
||||
printf("\n");
|
||||
|
||||
/* lists all the commands and the basic descriptions */
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ACTIVE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ADD);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ASSIGN);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ATTACH);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ATTRIBUTES);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_AUTOMOUNT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_BREAK);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_CLEAN);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_COMPACT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_CONVERT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_CREATE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_DELETE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_DETACH);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_DETAIL);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_EXIT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_EXPAND);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_EXTEND);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_FS);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_FORMAT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_GPT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_HELP);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_IMPORT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_INACTIVE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_LIST);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_MERGE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_OFFLINE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_ONLINE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_RECOVER);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_REM);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_REMOVE);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_REPAIR);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_RESCAN);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_RETAIN);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_SAN);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_SELECT);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_SETID);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_SHRINK);
|
||||
PrintResourceString(IDS_HELP_CMD_DESC_UNIQUEID);
|
||||
for(cmdptr = cmds; cmdptr->name; cmdptr++)
|
||||
PrintResourceString(cmdptr->help_desc);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
VOID help_help(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_HELP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* help_main(char *arg):
|
||||
* main entry point for the help command. Gives help to users who needs it.
|
||||
*/
|
||||
BOOL help_main(INT argc, WCHAR **argv)
|
||||
BOOL help_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
PCOMMAND cmdptr;
|
||||
|
||||
|
@ -84,9 +43,9 @@ BOOL help_main(INT argc, WCHAR **argv)
|
|||
/* Scan internal command table */
|
||||
for (cmdptr = cmds; cmdptr->name; cmdptr++)
|
||||
{
|
||||
if (_wcsicmp(argv[1], cmdptr->name) == 0 && cmdptr->help != NULL)
|
||||
if(_wcsicmp(argv[1], cmdptr->name) == 0)
|
||||
{
|
||||
cmdptr->help(argc, argv);
|
||||
PrintResourceString(cmdptr->help);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL import_main(INT argc, WCHAR **argv)
|
||||
BOOL import_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID help_import(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_IMPORT);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL inactive_main(INT argc, WCHAR **argv)
|
||||
BOOL inactive_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_inactive(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_INACTIVE);
|
||||
}
|
||||
|
|
|
@ -9,86 +9,79 @@
|
|||
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL exit_main(INT argc, WCHAR **argv);
|
||||
BOOL rem_main(INT argc, WCHAR **argv);
|
||||
BOOL exit_main(INT argc, LPWSTR *argv);
|
||||
BOOL rem_main(INT argc, LPWSTR *argv);
|
||||
|
||||
|
||||
COMMAND cmds[] =
|
||||
{
|
||||
{L"active", active_main, help_active},
|
||||
{L"add", add_main, help_add},
|
||||
{L"assign", assign_main, help_assign},
|
||||
{L"attributes", attributes_main, help_attributes},
|
||||
{L"automount", automount_main, help_automount},
|
||||
{L"break", break_main, help_break},
|
||||
{L"clean", clean_main, help_clean},
|
||||
{L"compact", compact_main, help_compact},
|
||||
{L"convert", convert_main, help_convert},
|
||||
{L"create", create_main, help_create},
|
||||
{L"delete", delete_main, help_delete},
|
||||
{L"detail", detail_main, help_detail},
|
||||
{L"detach", detach_main, help_detach},
|
||||
{L"exit", exit_main, NULL},
|
||||
{L"expand", expand_main, help_expand},
|
||||
{L"extend", extend_main, help_extend},
|
||||
{L"filesystems", filesystems_main, help_filesystems},
|
||||
{L"format", format_main, help_format},
|
||||
{L"gpt", gpt_main, help_gpt},
|
||||
{L"help", help_main, help_help},
|
||||
{L"list", list_main, help_list},
|
||||
{L"import", import_main, help_import},
|
||||
{L"inactive", inactive_main, help_inactive},
|
||||
{L"merge", merge_main, help_merge},
|
||||
{L"offline", offline_main, help_offline},
|
||||
{L"online", online_main, help_online},
|
||||
{L"recover", recover_main, help_recover},
|
||||
{L"rem", rem_main, NULL},
|
||||
{L"remove", remove_main, help_remove},
|
||||
{L"repair", repair_main, help_repair},
|
||||
{L"rescan", rescan_main, help_rescan},
|
||||
{L"retain", retain_main, help_retain},
|
||||
{L"san", san_main, help_san},
|
||||
{L"select", select_main, help_select},
|
||||
{L"setid", setid_main, help_setid},
|
||||
{L"shrink", shrink_main, help_shrink},
|
||||
{L"uniqueid", uniqueid_main, help_uniqueid},
|
||||
{NULL, NULL, NULL}
|
||||
{L"active", active_main, IDS_HELP_CMD_ACTIVE, IDS_HELP_CMD_DESC_ACTIVE},
|
||||
{L"add", add_main, IDS_HELP_CMD_ADD, IDS_HELP_CMD_DESC_ADD},
|
||||
{L"assign", assign_main, IDS_HELP_CMD_ASSIGN, IDS_HELP_CMD_DESC_ASSIGN},
|
||||
{L"attach", attach_main, IDS_HELP_CMD_ATTACH, IDS_HELP_CMD_DESC_ATTACH},
|
||||
{L"attributes", attributes_main, IDS_HELP_CMD_ATTRIBUTES, IDS_HELP_CMD_DESC_ATTRIBUTES},
|
||||
{L"automount", automount_main, IDS_HELP_CMD_AUTOMOUNT, IDS_HELP_CMD_DESC_AUTOMOUNT},
|
||||
{L"break", break_main, IDS_HELP_CMD_BREAK, IDS_HELP_CMD_DESC_BREAK},
|
||||
{L"clean", clean_main, IDS_HELP_CMD_CLEAN, IDS_HELP_CMD_DESC_CLEAN},
|
||||
{L"compact", compact_main, IDS_HELP_CMD_COMPACT, IDS_HELP_CMD_DESC_COMPACT},
|
||||
{L"convert", convert_main, IDS_HELP_CMD_CONVERT, IDS_HELP_CMD_DESC_CONVERT},
|
||||
{L"create", create_main, IDS_HELP_CMD_CREATE, IDS_HELP_CMD_DESC_CREATE},
|
||||
{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"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},
|
||||
{L"filesystems", filesystems_main, IDS_HELP_CMD_FILESYSTEMS, IDS_HELP_CMD_DESC_FS},
|
||||
{L"format", format_main, IDS_HELP_CMD_FORMAT, IDS_HELP_CMD_DESC_FORMAT},
|
||||
{L"gpt", gpt_main, IDS_HELP_CMD_GPT, IDS_HELP_CMD_DESC_GPT},
|
||||
{L"help", help_main, IDS_HELP_CMD_HELP, IDS_HELP_CMD_DESC_HELP},
|
||||
{L"import", import_main, IDS_HELP_CMD_IMPORT, IDS_HELP_CMD_DESC_IMPORT},
|
||||
{L"inactive", inactive_main, IDS_HELP_CMD_INACTIVE, IDS_HELP_CMD_DESC_INACTIVE},
|
||||
{L"list", list_main, IDS_HELP_CMD_LIST, IDS_HELP_CMD_DESC_LIST},
|
||||
{L"merge", merge_main, IDS_HELP_CMD_MERGE, IDS_HELP_CMD_DESC_MERGE},
|
||||
{L"offline", offline_main, IDS_HELP_CMD_OFFLINE, IDS_HELP_CMD_DESC_OFFLINE},
|
||||
{L"online", online_main, IDS_HELP_CMD_ONLINE, IDS_HELP_CMD_DESC_ONLINE},
|
||||
{L"recover", recover_main, IDS_HELP_CMD_RECOVER, IDS_HELP_CMD_DESC_RECOVER},
|
||||
{L"rem", NULL, IDS_NONE, IDS_HELP_CMD_DESC_REM},
|
||||
{L"remove", remove_main, IDS_HELP_CMD_REMOVE, IDS_HELP_CMD_DESC_REMOVE},
|
||||
{L"repair", repair_main, IDS_HELP_CMD_REPAIR, IDS_HELP_CMD_DESC_REPAIR},
|
||||
{L"rescan", rescan_main, IDS_HELP_CMD_RESCAN, IDS_HELP_CMD_DESC_RESCAN},
|
||||
{L"retain", retain_main, IDS_HELP_CMD_RETAIN, IDS_HELP_CMD_DESC_RETAIN},
|
||||
{L"san", san_main, IDS_HELP_CMD_SAN, IDS_HELP_CMD_DESC_SAN},
|
||||
{L"select", select_main, IDS_HELP_CMD_SELECT, IDS_HELP_CMD_DESC_SELECT},
|
||||
{L"setid", setid_main, IDS_HELP_CMD_SETID, IDS_HELP_CMD_DESC_SETID},
|
||||
{L"shrink", shrink_main, IDS_HELP_CMD_SHRINK, IDS_HELP_CMD_DESC_SHRINK},
|
||||
{L"uniqueid", uniqueid_main, IDS_HELP_CMD_UNIQUEID, IDS_HELP_CMD_DESC_UNIQUEID},
|
||||
{NULL, NULL, IDS_NONE, IDS_NONE}
|
||||
};
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
BOOL
|
||||
exit_main(INT argc, WCHAR **argv)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
rem_main(INT argc, WCHAR **argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* InterpretCmd(char *cmd_line, char *arg_line):
|
||||
* compares the command name to a list of available commands, and
|
||||
* determines which function to envoke.
|
||||
*/
|
||||
BOOL
|
||||
InterpretCmd(int argc, WCHAR **argv)
|
||||
InterpretCmd(int argc, LPWSTR *argv)
|
||||
{
|
||||
PCOMMAND cmdptr;
|
||||
|
||||
/* Scan internal command table */
|
||||
for (cmdptr = cmds; cmdptr->name; cmdptr++)
|
||||
{
|
||||
/* First, determine if the user wants to exit
|
||||
or to use a comment */
|
||||
if(wcsicmp(argv[0], L"exit") == 0)
|
||||
return FALSE;
|
||||
|
||||
if(wcsicmp(argv[0], L"rem") == 0)
|
||||
return TRUE;
|
||||
|
||||
if (wcsicmp(argv[0], cmdptr->name) == 0)
|
||||
{
|
||||
return cmdptr->func(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
help_cmdlist();
|
||||
|
@ -102,12 +95,12 @@ InterpretCmd(int argc, WCHAR **argv)
|
|||
* The main function used for when reading commands from scripts.
|
||||
*/
|
||||
BOOL
|
||||
InterpretScript(WCHAR *input_line)
|
||||
InterpretScript(LPWSTR input_line)
|
||||
{
|
||||
WCHAR *args_vector[MAX_ARGS_COUNT];
|
||||
LPWSTR args_vector[MAX_ARGS_COUNT];
|
||||
INT args_count = 0;
|
||||
BOOL bWhiteSpace = TRUE;
|
||||
WCHAR *ptr;
|
||||
LPWSTR ptr;
|
||||
|
||||
memset(args_vector, 0, sizeof(args_vector));
|
||||
|
||||
|
@ -148,11 +141,11 @@ VOID
|
|||
InterpretMain(VOID)
|
||||
{
|
||||
WCHAR input_line[MAX_STRING_SIZE];
|
||||
WCHAR *args_vector[MAX_ARGS_COUNT];
|
||||
LPWSTR args_vector[MAX_ARGS_COUNT];
|
||||
INT args_count = 0;
|
||||
BOOL bWhiteSpace = TRUE;
|
||||
BOOL bRun = TRUE;
|
||||
WCHAR *ptr;
|
||||
LPWSTR ptr;
|
||||
|
||||
while (bRun == TRUE)
|
||||
{
|
||||
|
@ -180,10 +173,8 @@ InterpretMain(VOID)
|
|||
args_vector[args_count] = ptr;
|
||||
args_count++;
|
||||
}
|
||||
|
||||
bWhiteSpace = FALSE;
|
||||
}
|
||||
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
|||
/* Basic application information */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APP_HEADER, "\nReactOS DiskPart\n"
|
||||
IDS_APP_HEADER, "ReactOS DiskPart"
|
||||
IDS_APP_USAGE, "\nDisk Partitioning Interpreter.\n\n\
|
||||
Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
|
||||
/S filename\tRuns the given script.\n\
|
||||
|
@ -196,6 +196,13 @@ BEGIN
|
|||
<Add convert command help text here>\n\n"
|
||||
END
|
||||
|
||||
/* Convert help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_HELP_CMD_CREATE "\n\
|
||||
<Add create command help text here>\n\n"
|
||||
END
|
||||
|
||||
/* Delete help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
|
@ -203,6 +210,13 @@ BEGIN
|
|||
<Add delete command help text here>\n\n"
|
||||
END
|
||||
|
||||
/* Delete help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_HELP_CMD_DETAIL "\n\
|
||||
<Add detail command help text here>\n\n"
|
||||
END
|
||||
|
||||
/* Detach help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
|
|
|
@ -15,7 +15,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
|||
/* Basic application information */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APP_HEADER, "\nReactOS DiskPart\n"
|
||||
IDS_APP_HEADER, "ReactOS DiskPart"
|
||||
IDS_APP_USAGE, "Interpretor pentru partiționare discuri.\n\nUtilizare: DISKPART [/S numefișier] [/T timplimită] [/?]\n\n\
|
||||
/S numefișier\tExecută scriptul din fișierul dat.\n\
|
||||
/T timplimită\tLimită temporală pentru prevenirea utilizării concurente.\n\
|
||||
|
@ -197,6 +197,14 @@ BEGIN
|
|||
<Adăugare manual pentru comanda «convert»>\n\n"
|
||||
END
|
||||
|
||||
/* Convert help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_HELP_CMD_CREATE "\n\
|
||||
<Adăugare manual pentru comanda «create»>\n\n"
|
||||
END
|
||||
|
||||
|
||||
/* Delete help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
|
@ -204,6 +212,13 @@ BEGIN
|
|||
<Adăugare manual pentru comanda «delete»>\n\n"
|
||||
END
|
||||
|
||||
/* Delete help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_HELP_CMD_DETAIL "\n\
|
||||
<Adăugare manual pentru comanda «detail»>\n\n"
|
||||
END
|
||||
|
||||
/* Detach help description */
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
|
|
|
@ -32,42 +32,26 @@ static VOID list_vdisk(VOID)
|
|||
printf("List VDisk!!\n");
|
||||
}
|
||||
|
||||
BOOL list_main(INT argc, WCHAR **argv)
|
||||
BOOL list_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
/* gets the first word from the string */
|
||||
if (argc == 1)
|
||||
{
|
||||
help_list(0, NULL);
|
||||
PrintResourceString(IDS_HELP_CMD_LIST);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* determines which to list (disk, partition, etc.) */
|
||||
if(!wcsicmp(argv[1], L"disk"))
|
||||
{
|
||||
list_disk();
|
||||
}
|
||||
else if(!wcsicmp(argv[1], L"partition"))
|
||||
{
|
||||
list_partition();
|
||||
}
|
||||
else if(!wcsicmp(argv[1], L"volume"))
|
||||
{
|
||||
list_volume();
|
||||
}
|
||||
else if(!wcsicmp(argv[1], L"vdisk"))
|
||||
{
|
||||
list_vdisk();
|
||||
}
|
||||
else
|
||||
{
|
||||
help_list(0, NULL);
|
||||
}
|
||||
PrintResourceString(IDS_HELP_CMD_LIST);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_list(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_LIST);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL merge_main(INT argc, WCHAR **argv)
|
||||
BOOL merge_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_merge(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_MERGE);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL offline_main(INT argc, WCHAR **argv)
|
||||
BOOL offline_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_offline(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_OFFLINE);
|
||||
}
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL online_main(INT argc, WCHAR **argv)
|
||||
BOOL online_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
help_online(0, NULL);
|
||||
PrintResourceString(IDS_HELP_CMD_ONLINE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_online(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_ONLINE);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL recover_main(INT argc, WCHAR **argv)
|
||||
BOOL recover_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_recover(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_RECOVER);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL remove_main(INT argc, WCHAR **argv)
|
||||
BOOL remove_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_remove(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_REMOVE);
|
||||
}
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL repair_main(INT argc, WCHAR **argv)
|
||||
BOOL repair_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
printf("\nTODO: Add code later since Win 7 Home Premium doesn't have this feature.\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_repair(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_REPAIR);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL rescan_main(INT argc, WCHAR **argv)
|
||||
BOOL rescan_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_rescan(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_RESCAN);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#ifndef RESOURCE_H
|
||||
#define RESOURCE_H
|
||||
|
||||
#define IDS_NONE -1
|
||||
#define IDS_APP_HEADER 0
|
||||
#define IDS_APP_USAGE 1
|
||||
#define IDS_APP_LICENSE 2
|
||||
|
@ -16,24 +17,24 @@
|
|||
#define IDS_APP_LEAVING 4
|
||||
#define IDS_APP_PROMPT 5
|
||||
|
||||
#define IDS_DETAIL_INFO_DISK_ID 6
|
||||
#define IDS_DETAIL_INFO_TYPE 7
|
||||
#define IDS_DETAIL_INFO_STATUS 8
|
||||
#define IDS_DETAIL_INFO_PATH 9
|
||||
#define IDS_DETAIL_INFO_TARGET 10
|
||||
#define IDS_DETAIL_INFO_LUN_ID 11
|
||||
#define IDS_DETAIL_INFO_LOC_PATH 12
|
||||
#define IDS_DETAIL_INFO_CURR_RO_STATE 13
|
||||
#define IDS_DETAIL_INFO_RO 14
|
||||
#define IDS_DETAIL_INFO_BOOT_DSK 15
|
||||
#define IDS_DETAIL_INFO_PAGE_FILE_DSK 16
|
||||
#define IDS_DETAIL_INFO_HIBER_FILE_DSK 17
|
||||
#define IDS_DETAIL_INFO_CRASH_DSK 18
|
||||
#define IDS_DETAIL_INFO_CLST_DSK 19
|
||||
#define IDS_DETAIL_INFO_DISK_ID 7
|
||||
#define IDS_DETAIL_INFO_TYPE 8
|
||||
#define IDS_DETAIL_INFO_STATUS 9
|
||||
#define IDS_DETAIL_INFO_PATH 10
|
||||
#define IDS_DETAIL_INFO_TARGET 11
|
||||
#define IDS_DETAIL_INFO_LUN_ID 12
|
||||
#define IDS_DETAIL_INFO_LOC_PATH 13
|
||||
#define IDS_DETAIL_INFO_CURR_RO_STATE 14
|
||||
#define IDS_DETAIL_INFO_RO 15
|
||||
#define IDS_DETAIL_INFO_BOOT_DSK 16
|
||||
#define IDS_DETAIL_INFO_PAGE_FILE_DSK 17
|
||||
#define IDS_DETAIL_INFO_HIBER_FILE_DSK 18
|
||||
#define IDS_DETAIL_INFO_CRASH_DSK 19
|
||||
#define IDS_DETAIL_INFO_CLST_DSK 20
|
||||
|
||||
#define IDS_LIST_DISK_HEAD 20
|
||||
#define IDS_LIST_DISK_LINE 21
|
||||
#define IDS_LIST_VOLUME_HEAD 22
|
||||
#define IDS_LIST_DISK_HEAD 21
|
||||
#define IDS_LIST_DISK_LINE 22
|
||||
#define IDS_LIST_VOLUME_HEAD 23
|
||||
|
||||
#define IDS_STATUS_YES 31
|
||||
#define IDS_STATUS_NO 32
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL retain_main(INT argc, WCHAR **argv)
|
||||
BOOL retain_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_retain(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_RETAIN);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL san_main(INT argc, WCHAR **argv)
|
||||
BOOL san_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_san(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_SAN);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL select_main(INT argc, WCHAR **argv)
|
||||
BOOL select_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_select(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_SELECT);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL setid_main(INT argc, WCHAR **argv)
|
||||
BOOL setid_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_setid(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_SETID);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL shrink_main(INT argc, WCHAR **argv)
|
||||
BOOL shrink_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_shrink(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_SHRINK);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
*/
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL uniqueid_main(INT argc, WCHAR **argv)
|
||||
BOOL uniqueid_main(INT argc, LPWSTR *argv)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
VOID help_uniqueid(INT argc, WCHAR **argv)
|
||||
{
|
||||
PrintResourceString(IDS_HELP_CMD_UNIQUEID);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue