Clarify some error messages

This commit is contained in:
Peter Eisentraut 2004-11-09 13:01:27 +00:00
parent 5c398e6e70
commit 3c093ff151
5 changed files with 19 additions and 19 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.5 2004/10/12 21:54:39 petere Exp $
* $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.6 2004/11/09 13:01:25 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -36,7 +36,7 @@ pgwin32_is_admin(void)
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
{
write_stderr("could not open process token: %d\n",
write_stderr("could not open process token: error code %d\n",
(int) GetLastError());
exit(1);
}
@ -49,7 +49,7 @@ pgwin32_is_admin(void)
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
write_stderr("could not get token information: %d\n",
write_stderr("could not get token information: error code %d\n",
(int) GetLastError());
exit(1);
}
@ -66,7 +66,7 @@ pgwin32_is_admin(void)
if (!GetTokenInformation(AccessToken, TokenGroups, InfoBuffer,
InfoBufferSize, &InfoBufferSize))
{
write_stderr("could not get token information: %d\n",
write_stderr("could not get token information: error code %d\n",
(int) GetLastError());
exit(1);
}
@ -77,7 +77,7 @@ pgwin32_is_admin(void)
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0,
0, &AdministratorsSid))
{
write_stderr("could not get SID for Administrators group: %d\n",
write_stderr("could not get SID for Administrators group: error code %d\n",
(int) GetLastError());
exit(1);
}
@ -86,7 +86,7 @@ pgwin32_is_admin(void)
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0,
0, &PowerUsersSid))
{
write_stderr("could not get SID for PowerUsers group: %d\n",
write_stderr("could not get SID for PowerUsers group: error code %d\n",
(int) GetLastError());
exit(1);
}
@ -146,7 +146,7 @@ pgwin32_is_service(void)
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
{
fprintf(stderr, "could not open process token: %d\n",
fprintf(stderr, "could not open process token: error code %d\n",
(int) GetLastError());
return -1;
}
@ -154,7 +154,7 @@ pgwin32_is_service(void)
/* First check for local system */
if (!GetTokenInformation(AccessToken, TokenUser, InfoBuffer, 1024, &InfoBufferSize))
{
fprintf(stderr, "could not get token information: %d\n",
fprintf(stderr, "could not get token information: error code %d\n",
(int) GetLastError());
return -1;
}
@ -181,7 +181,7 @@ pgwin32_is_service(void)
/* Now check for group SID */
if (!GetTokenInformation(AccessToken, TokenGroups, InfoBuffer, 1024, &InfoBufferSize))
{
fprintf(stderr, "could not get token information: %d\n",
fprintf(stderr, "could not get token information: error code %d\n",
(int) GetLastError());
return -1;
}

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/port/win32/signal.c,v 1.8 2004/10/12 21:54:39 petere Exp $
* $PostgreSQL: pgsql/src/backend/port/win32/signal.c,v 1.9 2004/11/09 13:01:25 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -224,7 +224,7 @@ pg_signal_thread(LPVOID param)
PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL);
if (pipe == INVALID_HANDLE_VALUE)
{
write_stderr("could not create signal listener pipe: %d; retrying\n", (int) GetLastError());
write_stderr("could not create signal listener pipe: error code %d; retrying\n", (int) GetLastError());
SleepEx(500, FALSE);
continue;
}
@ -236,7 +236,7 @@ pg_signal_thread(LPVOID param)
(LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread,
(LPVOID) pipe, 0, NULL);
if (hThread == INVALID_HANDLE_VALUE)
write_stderr("could not create signal dispatch thread: %d\n",
write_stderr("could not create signal dispatch thread: error code %d\n",
(int) GetLastError());
else
CloseHandle(hThread);

View File

@ -19,7 +19,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.9 2004/08/29 05:06:46 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.10 2004/11/09 13:01:26 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -389,7 +389,7 @@ pgarch_ArchiverCopyLoop(void)
if (++failures >= NUM_ARCHIVE_RETRIES)
{
ereport(WARNING,
(errmsg("transaction log file \"%s\" could not be archived",
(errmsg("transaction log file \"%s\" could not be archived: too many failures",
xlog)));
return; /* give up archiving for now */
}

View File

@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.436 2004/11/02 03:34:50 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.437 2004/11/09 13:01:26 petere Exp $
*
* NOTES
*
@ -2847,7 +2847,7 @@ internal_forkexec(int argc, char *argv[], Port *port)
if (execv(postgres_exec_path, argv) < 0)
{
ereport(LOG,
(errmsg("could not exec backend process \"%s\": %m",
(errmsg("could not execute server process \"%s\": %m",
postgres_exec_path)));
/* We're already in the child process here, can't return */
exit(1);
@ -3760,7 +3760,7 @@ win32_sigchld_waiter(LPVOID param)
if (r == WAIT_OBJECT_0)
pg_queue_signal(SIGCHLD);
else
write_stderr("could not wait on child process handle: %d\n",
write_stderr("could not wait on child process handle: error code %d\n",
(int) GetLastError());
CloseHandle(procHandle);
return 0;

View File

@ -18,7 +18,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.10 2004/10/12 21:54:40 petere Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.11 2004/11/09 13:01:27 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -416,7 +416,7 @@ SysLogger_Start(void)
if (!CreatePipe(&syslogPipe[0], &syslogPipe[1], &sa, 32768))
ereport(FATAL,
(errcode_for_file_access(),
(errmsg("could not create pipe for syslogging: %m"))));
(errmsg("could not create pipe for syslog: %m"))));
}
#endif