fix is a partial (intentionally non-squashed) pick of 0.4.14-dev-1142-g 92aabb07fb (#2393)
Yes, I do see that we still have some '\n.' typos in some files, e.g.
base/applications/shutdown/it-IT.rc. I will take care of them later!
fix is a partial (intentionally non-squashed) pick of 0.4.14-dev-1142-g 92aabb07fb (#2393)
Yes, I double-checked the msi_en.rc, and we do only use the \t after the \n (without additional spaces).
It is a good harmonization therefore to reduce the indentation level here.
This lets forward NULL Info.psd/Info.psd->lpDescription/Info.psfa,
instead of an uninitialized value.
Currently this branch does not show the bug CORE-14521, but that is just because
it doesn't use the more mean "advapi32 : service" test of 0.4.10.
If we would port again the newer test back from 0.4.9-dev-555-g 3c1b7834e1
(which has been reverted via 0.4.9-dev-576-g a67df65c4f as a temporary workaround for releases/0.4.9)
, then we would see it hanging as well.
fix picked from 0.4.10-dev-627-g e3a1c2c81b
I also muted a forgotten DPRINT1, like it was done during 0.4.10-dev'ing on master.
This will avoid triggering a FAT repair on
unclean FAT volumes.
If dosfstools.fsck works fine in Linux, its
usage on ReactOS triggers worse corruption
than unclean shutdown.
'autochk during OS startup' has been added during 0.4.9-dev-xxxx.
Given I've no time for debugging this, I
kill it off. This is just a workaround of course.
For now the best chances to repair a FAT FS corruption after non-clean-shutdown
is to mount that FS within 2k3sp2 and give the MS chkdsk an attempt to repair it.
Success is not guaranteed, but it works surprisingly often.
The earlier you do that after non-clean-shutdown,
the better your chances for success will be.
The workaround was picked from
0.4.13-dev-169-g ab69736a1d
0.4.10-dev-379-g 3b6faba11a (partially, just enough to support the early-bailout)
- RI_ScSetServiceBitsA: Just call RI_ScSetServiceBitsW.
- RI_ScSetServiceBitsW: Store the service bits in the service list entry.
TODO: Merge all service bits in a global variable and pass it to the server service. Maybe use netapi.I_NetServerSetServiceBits(Ex)?
- Perform an immediate system shutdown if the timeout is zero, otherwise
display the countdown shutdown dialog.
- Cleanup pShutdownParams->pszMessage as soon as the dialog goes away.
- It actually appears (tested on Windows 2000 and 2003) that sending
WM_CLOSE messages from a user-mode app to the shutdown dialog really
do nothing (and in particular does not cancel the shutdown!), so modify
the code to take this fact into account.
- Use the "%d days" format for timeouts longer than a day.
- Fail if timeout is 10 years or longer.
- TODO: Replace format strings by resources. German WinXP uses "%d days" instead of "%d Tage". We can do better! ;-)
- Replace the winlogon icon by the warning icon.
- Add more space for the main text.
- Move the shutdown time into a separate line to ensure it is always fully visible.
- Add more space for the shutdown message and keep the message empty by default.
- Clean up the resource IDs.
- Replace the UNICODE_STRING usMessage by a PWSTR pszMessage.
- Use the "%02d:%02d:%02d" time format and get rid of the safe string printf because the string will NEVER be longer than 8 characters.
- Rename the timer id constant because it is NOT a resource id.
- Rename variables according to the coding style.
- Add empty lines to separate logical blocks of code.
- Add spaces according to our coding style.
- Move g_hShutdownDialog and g_bShuttingDown into the shutdown parameters struct.
- Pass a pointer to the shutdown parameters to the shutdown thread and the shutdown dialog and use the pointer instead of the global variables.
- Move the timer code into a separate function because it requires local variables.
services\database.c:
- Refactor ScmControlService() so that it can be used to send the dispatcher loop stop command.
- Separate the code to decrement the image run counter from the service image cleanup code.
services\rpcserver.c:
- RSetServiceStatus(): Stop the dispatcher loop when the image run counter is zero and remove the service image after that.
advapi32\service\sctrl.c:
- Do not terminate the service dispatcher loop when the last service is being stopped. Wait for an explicit dispatcher stop command (empty service name).
CORE-12413
- ScmUnloadDriver: Handle failed unload properly.
- ScmGetDriverStatus: A driver is running when its driver object was found. Otherwise it has been stopped.
- ScmControlDriver: Check a drivers status before and after unloading.
CORE-14317
- The initial dwWin32ExitCode for a disabled service is ERROR_SERVICE_DISABLED and ERROR_SRVICE_NEVER_STARTED for non-disabled services.
- The initial dwWaitHint is 2000 (2 seconds) for (user-mode) services and 0 for drivers.
- Move all driver-related code to driver.c.
This makes use of previous commit vfatlib improvements that allow
caller to stop chkdsk if locking fail, which will happen if volume is in use.
That way, ReactOS users won't be able any longer to f*** up their C:\ volume
by attempting to chkdsk -f it!
CORE-14087
The current implementation was broken and some dead code was never called; always failing before.
This fix revives this dead code!
Extra fix: avoid derefencing potential null-ptr.
And also, as bonus, comment the function so that logic can be easily understood.
CORE-14062