summaryrefslogtreecommitdiff
path: root/bin/bbackupd/Win32ServiceFunctions.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-03-28 22:18:44 +0000
committerChris Wilson <chris+github@qwirx.com>2008-03-28 22:18:44 +0000
commit4fca88ed02c1f0b5208abf2420f73023de54c23e (patch)
tree51e882893d283f05b569bd27f7efab7b041c4548 /bin/bbackupd/Win32ServiceFunctions.cpp
parent74bfdebe02405f7847fded96e42c1ccd297c9b9f (diff)
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.
Diffstat (limited to 'bin/bbackupd/Win32ServiceFunctions.cpp')
-rw-r--r--bin/bbackupd/Win32ServiceFunctions.cpp6
1 files changed, 3 insertions, 3 deletions
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)
{