diff options
author | Peter Eisentraut | 2011-08-23 19:00:52 +0000 |
---|---|---|
committer | Peter Eisentraut | 2011-08-23 19:00:52 +0000 |
commit | 1af55e2751cdf3bf3bf25993c34be1fa9ad1e342 (patch) | |
tree | 2ba411836fc1e8a4a5d8a4e0ef7723e76ad6daa9 /src/port/exec.c | |
parent | 6c6a4153338c2b2e33203bfb02a26ff8e3d2abd4 (diff) |
Use consistent format for reporting GetLastError()
Use something like "error code %lu" for reporting GetLastError()
values on Windows. Previously, a mix of different wordings and
formats were in use.
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index 21a951c424d..a795e24be3f 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -646,13 +646,13 @@ AddUserToTokenDacl(HANDLE hToken) if (!GetTokenInformation(hToken, tic, (LPVOID) ptdd, dwSize, &dwSize)) { - log_error("could not get token information: %lu", GetLastError()); + log_error("could not get token information: error code %lu", GetLastError()); goto cleanup; } } else { - log_error("could not get token information buffer size: %lu", GetLastError()); + log_error("could not get token information buffer size: error code %lu", GetLastError()); goto cleanup; } } @@ -662,7 +662,7 @@ AddUserToTokenDacl(HANDLE hToken) (DWORD) sizeof(ACL_SIZE_INFORMATION), AclSizeInformation)) { - log_error("could not get ACL information: %lu", GetLastError()); + log_error("could not get ACL information: error code %lu", GetLastError()); goto cleanup; } @@ -672,7 +672,7 @@ AddUserToTokenDacl(HANDLE hToken) */ if (!GetTokenUser(hToken, &pTokenUser)) { - log_error("could not get user token: %lu", GetLastError()); + log_error("could not get user token: error code %lu", GetLastError()); goto cleanup; } @@ -690,7 +690,7 @@ AddUserToTokenDacl(HANDLE hToken) if (!InitializeAcl(pacl, dwNewAclSize, ACL_REVISION)) { - log_error("could not initialize ACL: %lu", GetLastError()); + log_error("could not initialize ACL: error code %lu", GetLastError()); goto cleanup; } @@ -699,13 +699,13 @@ AddUserToTokenDacl(HANDLE hToken) { if (!GetAce(ptdd->DefaultDacl, i, (LPVOID *) &pace)) { - log_error("could not get ACE: %lu", GetLastError()); + log_error("could not get ACE: error code %lu", GetLastError()); goto cleanup; } if (!AddAce(pacl, ACL_REVISION, MAXDWORD, pace, ((PACE_HEADER) pace)->AceSize)) { - log_error("could not add ACE: %lu", GetLastError()); + log_error("could not add ACE: error code %lu", GetLastError()); goto cleanup; } } @@ -713,7 +713,7 @@ AddUserToTokenDacl(HANDLE hToken) /* Add the new ACE for the current user */ if (!AddAccessAllowedAceEx(pacl, ACL_REVISION, OBJECT_INHERIT_ACE, GENERIC_ALL, pTokenUser->User.Sid)) { - log_error("could not add access allowed ACE: %lu", GetLastError()); + log_error("could not add access allowed ACE: error code %lu", GetLastError()); goto cleanup; } @@ -722,7 +722,7 @@ AddUserToTokenDacl(HANDLE hToken) if (!SetTokenInformation(hToken, tic, (LPVOID) &tddNew, dwNewAclSize)) { - log_error("could not set token information: %lu", GetLastError()); + log_error("could not set token information: error code %lu", GetLastError()); goto cleanup; } @@ -774,7 +774,7 @@ GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser) } else { - log_error("could not get token information buffer size: %lu", GetLastError()); + log_error("could not get token information buffer size: error code %lu", GetLastError()); return FALSE; } } @@ -788,7 +788,7 @@ GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser) LocalFree(*ppTokenUser); *ppTokenUser = NULL; - log_error("could not get token information: %lu", GetLastError()); + log_error("could not get token information: error code %lu", GetLastError()); return FALSE; } |