From 4fca88ed02c1f0b5208abf2420f73023de54c23e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 28 Mar 2008 22:18:44 +0000 Subject: Improve logging with macros that consistently output strerror(errno) and errno, replacing almost all use of strerror() in the main code. Log a more detailed error message before throwing an exception for some more system call failures. Make FileStream store its filename on all platforms, not just Windows. Wrap some long lines at less than 80 characters to improve readability. Fix some minor violations of coding standard (white space) and a typo in a comment. --- bin/bbackupd/Win32ServiceFunctions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/bbackupd/Win32ServiceFunctions.cpp') diff --git a/bin/bbackupd/Win32ServiceFunctions.cpp b/bin/bbackupd/Win32ServiceFunctions.cpp index a7bf6bd9..53be3bc7 100644 --- a/bin/bbackupd/Win32ServiceFunctions.cpp +++ b/bin/bbackupd/Win32ServiceFunctions.cpp @@ -207,8 +207,8 @@ int InstallService(const char* pConfigFileName, const std::string& rServiceName) if (emu_stat(pConfigFileName, &st) != 0) { - BOX_ERROR("Failed to open configuration file '" << - pConfigFileName << "': " << strerror(errno)); + BOX_LOG_SYS_ERROR("Failed to open configuration file " + "'" << pConfigFileName << "'"); return 1; } @@ -221,7 +221,7 @@ int InstallService(const char* pConfigFileName, const std::string& rServiceName) } } - SC_HANDLE scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE); + SC_HANDLE scm = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE); if (!scm) { -- cgit v1.2.3