Author: ekohl
Date: Tue Jun 10 21:35:39 2014
New Revision: 63587
URL:
http://svn.reactos.org/svn/reactos?rev=63587&view=rev
Log:
[NET]
Implement the /help option for the pause, start and stop commands.
Modified:
trunk/reactos/base/applications/network/net/cmdPause.c
trunk/reactos/base/applications/network/net/cmdStart.c
trunk/reactos/base/applications/network/net/cmdStop.c
Modified: trunk/reactos/base/applications/network/net/cmdPause.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdPause.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdPause.c [iso-8859-1] Tue Jun 10
21:35:39 2014
@@ -15,11 +15,21 @@
SC_HANDLE hService = NULL;
SERVICE_STATUS status;
INT nError = 0;
+ INT i;
if (argc != 3)
{
PrintResourceString(IDS_PAUSE_SYNTAX);
return 1;
+ }
+
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_PAUSE_HELP);
+ return 1;
+ }
}
hManager = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE,
SC_MANAGER_ENUMERATE_SERVICE);
Modified: trunk/reactos/base/applications/network/net/cmdStart.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdStart.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdStart.c [iso-8859-1] Tue Jun 10
21:35:39 2014
@@ -162,16 +162,21 @@
INT
cmdStart(INT argc, WCHAR **argv)
{
- INT nError = 0;
+ INT i;
if (argc == 2)
{
- nError = EnumerateRunningServices();
- }
- else
- {
- nError = StartOneService(argc, argv);
+ return EnumerateRunningServices();
}
- return nError;
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_START_HELP);
+ return 1;
+ }
+ }
+
+ return StartOneService(argc, argv);
}
Modified: trunk/reactos/base/applications/network/net/cmdStop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdStop.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdStop.c [iso-8859-1] Tue Jun 10 21:35:39
2014
@@ -16,11 +16,21 @@
SERVICE_STATUS ServiceStatus;
DWORD dwError = ERROR_SUCCESS;
INT nError = 0;
+ INT i;
if (argc != 3)
{
PrintResourceString(IDS_STOP_SYNTAX);
return 1;
+ }
+
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_STOP_HELP);
+ return 1;
+ }
}
hManager = OpenSCManagerW(NULL,