[PATCH v2 3/3] sc: Don't silently fail when something doesn't work as expected in a few more places.

Dmitry Timoshkov dmitry at baikal.ru
Tue Mar 22 09:22:40 CDT 2022


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 programs/sc/sc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/programs/sc/sc.c b/programs/sc/sc.c
index a925f2cc999..5202980f32f 100644
--- a/programs/sc/sc.c
+++ b/programs/sc/sc.c
@@ -295,7 +295,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             if (parse_failure_params( argc - 3, argv + 3, &sfa ))
             {
                 ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_FAILURE_ACTIONS, &sfa );
-                if (!ret) WINE_TRACE("failed to set service failure actions %lu\n", GetLastError());
+                if (!ret) WINE_ERR("failed to set service failure actions %lu\n", GetLastError());
                 HeapFree( GetProcessHeap(), 0, sfa.lpsaActions );
             }
             else
@@ -310,7 +310,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = DeleteService( service );
-            if (!ret) WINE_TRACE("failed to delete service %lu\n", GetLastError());
+            if (!ret) WINE_ERR("failed to delete service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
         else WINE_ERR("failed to open service %lu\n", GetLastError());
@@ -321,7 +321,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = StartServiceW( service, argc - 3, argv + 3 );
-            if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
+            if (!ret) WINE_ERR("failed to start service %lu\n", GetLastError());
             else query_service( manager, argv[2] );
             CloseServiceHandle( service );
         }
@@ -333,7 +333,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         if (service)
         {
             ret = ControlService( service, SERVICE_CONTROL_STOP, &status );
-            if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
+            if (!ret) WINE_ERR("failed to stop service %lu\n", GetLastError());
             else query_service( manager, argv[2] );
             CloseServiceHandle( service );
         }
-- 
2.35.1




More information about the wine-devel mailing list