mirror of
https://github.com/reactos/reactos.git
synced 2024-10-14 21:25:14 +00:00
Readd the removed line from the patch and add more information about the Usage of the "-f" option (see comment #6 of bug #2379)
The "-f" option now works like in Windows: If you did not specify any other parameter, it will also log off from the current session. svn path=/trunk/; revision=27702
This commit is contained in:
parent
3467fa05cc
commit
4f3f3a53bc
|
@ -19,6 +19,8 @@ static void PrintUsage() {
|
||||||
_tprintf(_T("\n -s\t\t\tShutdown the computer"));
|
_tprintf(_T("\n -s\t\t\tShutdown the computer"));
|
||||||
_tprintf(_T("\n -r\t\t\tShutdown and restart the computer"));
|
_tprintf(_T("\n -r\t\t\tShutdown and restart the computer"));
|
||||||
_tprintf(_T("\n -f\t\t\tForces running applications to close without warnings"));
|
_tprintf(_T("\n -f\t\t\tForces running applications to close without warnings"));
|
||||||
|
_tprintf(_T("\n \t\t\tIf you did not specify any other parameter, this option"));
|
||||||
|
_tprintf(_T("\n \t\t\twill also log off"));
|
||||||
_tprintf(_T("\n"));
|
_tprintf(_T("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,8 +98,14 @@ static struct ExitOptions ParseCommandLineOptionsToExitOptions(struct CommandLin
|
||||||
|
|
||||||
// Sets additional flags
|
// Sets additional flags
|
||||||
if (opts.force)
|
if (opts.force)
|
||||||
|
{
|
||||||
exitOpts.flags = exitOpts.flags | EWX_FORCE;
|
exitOpts.flags = exitOpts.flags | EWX_FORCE;
|
||||||
|
|
||||||
|
// This makes sure that we log off, also if there is only the "-f" option specified.
|
||||||
|
// The Windows shutdown utility does it the same way.
|
||||||
|
exitOpts.shouldExit = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// Reason for shutdown
|
// Reason for shutdown
|
||||||
// Hardcoded to "Other (Planned)"
|
// Hardcoded to "Other (Planned)"
|
||||||
exitOpts.reason = SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED;
|
exitOpts.reason = SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED;
|
||||||
|
|
Loading…
Reference in a new issue