Dmitry Timoshkov : sc: Don't silently fail when something doesn't work as expected.

Alexandre Julliard julliard at winehq.org
Fri Mar 18 16:39:55 CDT 2022


Module: wine
Branch: master
Commit: 1447872b0c993113b7bd8215967a502e7aa644e9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1447872b0c993113b7bd8215967a502e7aa644e9

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Mar 18 17:10:52 2022 +0300

sc: Don't silently fail when something doesn't work as expected.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/sc/sc.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/programs/sc/sc.c b/programs/sc/sc.c
index bd3064da2d8..4e642874237 100644
--- a/programs/sc/sc.c
+++ b/programs/sc/sc.c
@@ -207,7 +207,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
         }
         if (!parse_create_params( argc - 3, argv + 3, &cp ))
         {
-            WINE_WARN("failed to parse create parameters\n");
+            WINE_ERR("failed to parse create parameters\n");
             CloseServiceHandle( manager );
             return 1;
         }
@@ -219,7 +219,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             CloseServiceHandle( service );
             ret = TRUE;
         }
-        else WINE_TRACE("failed to create service %lu\n", GetLastError());
+        else WINE_ERR("failed to create service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"description" ))
     {
@@ -229,10 +229,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             SERVICE_DESCRIPTIONW sd;
             sd.lpDescription = argc > 3 ? (WCHAR *)argv[3] : NULL;
             ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &sd );
-            if (!ret) WINE_TRACE("failed to set service description %lu\n", GetLastError());
+            if (!ret) WINE_ERR("failed to set service description %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %lu\n", GetLastError());
+        else WINE_ERR("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"failure" ))
     {
@@ -247,10 +247,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
                 HeapFree( GetProcessHeap(), 0, sfa.lpsaActions );
             }
             else
-                WINE_WARN("failed to parse failure parameters\n");
+                WINE_ERR("failed to parse failure parameters\n");
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %lu\n", GetLastError());
+        else WINE_ERR("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"delete" ))
     {
@@ -261,7 +261,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             if (!ret) WINE_TRACE("failed to delete service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %lu\n", GetLastError());
+        else WINE_ERR("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"start" ))
     {
@@ -272,7 +272,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %lu\n", GetLastError());
+        else WINE_ERR("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"stop" ))
     {
@@ -283,7 +283,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
             if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
             CloseServiceHandle( service );
         }
-        else WINE_TRACE("failed to open service %lu\n", GetLastError());
+        else WINE_ERR("failed to open service %lu\n", GetLastError());
     }
     else if (!wcsicmp( argv[1], L"sdset" ))
     {




More information about the wine-cvs mailing list