1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Error message editing in backend/bootstrap, /lib, /nodes, /port.

This commit is contained in:
Tom Lane
2003-07-22 23:30:39 +00:00
parent 56f87688c4
commit c72839d5be
21 changed files with 121 additions and 113 deletions

View File

@@ -7,13 +7,11 @@
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <errno.h>
#include <unistd.h>
#include <OS.h>
#include "utils/elog.h"
/*#define TDBG*/
#ifdef TDBG
@@ -155,7 +153,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
{
/* TO BE IMPLEMENTED */
TRACEDBG("--semctl getncnt");
elog(ERROR, "beos : semctl error : GETNCNT not implemented");
elog(ERROR, "semctl error: GETNCNT not implemented");
return 0;
}
@@ -170,7 +168,7 @@ semctl(int semId, int semNum, int flag, union semun semun)
return cnt;
}
elog(ERROR, "beos : semctl error : unknown flag");
elog(ERROR, "semctl error: unknown flag");
TRACEDBG("<-semctl unknown flag");
return 0;

View File

@@ -42,7 +42,7 @@ beos_dl_open(char *filename)
if ((beos_dl_port_in <= 0) || (beos_dl_port_out <= 0))
{
elog(WARNING, "Error loading BeOS support server : can't create communication ports");
elog(WARNING, "error loading BeOS support server: could not create communication ports");
return B_ERROR;
}
else
@@ -68,7 +68,7 @@ beos_dl_open(char *filename)
/* Checking integrity */
if (im < 0)
{
elog(WARNING, "Can't load this add-on ");
elog(WARNING, "could not load this add-on");
return B_ERROR;
}
else
@@ -92,7 +92,7 @@ beos_dl_open(char *filename)
/* Remap */
resu = clone_area(datas, &add, B_EXACT_ADDRESS, B_READ_AREA | B_WRITE_AREA, area);
if (resu < 0)
elog(WARNING, "Can't load this add-on : map text error");
elog(WARNING, "could not load this add-on: map text error");
}
/* read text segment id and address */
@@ -108,7 +108,7 @@ beos_dl_open(char *filename)
/* Remap */
resu = clone_area(datas, &add, B_EXACT_ADDRESS, B_READ_AREA | B_WRITE_AREA, area);
if (resu < 0)
elog(WARNING, "Can't load this add-on : map data error");
elog(WARNING, "could not load this add-on: map data error");
}
return im;
@@ -126,7 +126,7 @@ beos_dl_sym(image_id im, char *symname, void **fptr)
read_port(beos_dl_port_out, (int32 *) (fptr), NULL, 0);
if (fptr == NULL)
elog(WARNING, "loading symbol '%s' failed ", symname);
elog(WARNING, "loading symbol \"%s\" failed", symname);
}
status_t

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/bsdi.c,v 1.20 2002/06/20 20:29:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/bsdi.c,v 1.21 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,14 +56,14 @@ pg_dlopen(char *filename)
{
if (dld_link("/usr/lib/libc.a"))
{
elog(WARNING, "dld: Cannot link C library!");
elog(WARNING, "could not link C library");
return NULL;
}
if (dld_undefined_sym_count > 0)
{
if (dld_link("/usr/lib/libm.a"))
{
elog(WARNING, "dld: Cannot link math library!");
elog(WARNING, "could not link math library");
return NULL;
}
if (dld_undefined_sym_count > 0)
@@ -72,10 +72,9 @@ pg_dlopen(char *filename)
char **list = dld_list_undefined_sym();
/* list the undefined symbols, if any */
elog(WARNING, "dld: Undefined:");
do
{
elog(WARNING, " %s", *list);
elog(WARNING, "\"%s\" is undefined", *list);
list++;
count--;
} while (count > 0);

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.23 2002/10/15 16:04:17 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.24 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,14 +68,14 @@ pg_dlopen(char *filename)
{
if (dld_link("/usr/lib/libc.a"))
{
elog(WARNING, "dld: Cannot link C library!");
elog(WARNING, "could not link C library");
return NULL;
}
if (dld_undefined_sym_count > 0)
{
if (dld_link("/usr/lib/libm.a"))
{
elog(WARNING, "dld: Cannot link math library!");
elog(WARNING, "could not link math library");
return NULL;
}
if (dld_undefined_sym_count > 0)
@@ -84,10 +84,9 @@ pg_dlopen(char *filename)
char **list = dld_list_undefined_sym();
/* list the undefined symbols, if any */
elog(WARNING, "dld: Undefined:");
do
{
elog(WARNING, " %s", *list);
elog(WARNING, "\"%s\" is undefined", *list);
list++;
count--;
} while (count > 0);

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.16 2002/11/08 20:23:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.17 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,10 +55,9 @@ pg_dlopen(char *filename)
/* list the undefined symbols, if any */
if (count)
{
elog(WARNING, "dl: Undefined:");
while (*list)
{
elog(WARNING, " %s", *list);
elog(WARNING, "\"%s\" is undefined", *list);
list++;
}
}

View File

@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.5 2002/09/04 20:31:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.6 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -90,7 +90,7 @@ void
on_shmem_exit(void (*function) (), Datum arg)
{
if (on_shmem_exit_index >= MAX_ON_EXITS)
elog(FATAL, "Out of on_shmem_exit slots");
elog(FATAL, "out of on_shmem_exit slots");
on_shmem_exit_list[on_shmem_exit_index].function = function;
on_shmem_exit_list[on_shmem_exit_index].arg = arg;

View File

@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.6 2002/09/04 20:31:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.7 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -165,7 +165,7 @@ PGReserveSemaphores(int maxSemas, int port)
{
mySemPointers = (sem_t **) malloc(maxSemas * sizeof(sem_t *));
if (mySemPointers == NULL)
elog(PANIC, "Out of memory in PGReserveSemaphores");
elog(PANIC, "out of memory");
numSems = 0;
maxSems = maxSemas;
nextSemKey = port * 1000;
@@ -202,7 +202,7 @@ PGSemaphoreCreate(PGSemaphore sema)
Assert(!IsUnderPostmaster);
if (numSems >= maxSems)
elog(PANIC, "PGSemaphoreCreate: too many semaphores created");
elog(PANIC, "too many semaphores created");
#ifdef USE_NAMED_POSIX_SEMAPHORES
*sema = newsem = PosixSemaphoreCreate();

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.5 2003/03/25 16:15:44 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.6 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -177,7 +177,7 @@ IpcSemaphoreKill(IpcSemaphoreId semId)
semId, strerror(errno));
/*
* We used to report a failure via elog(WARNING), but that's pretty
* We used to report a failure via ereport(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}
@@ -316,7 +316,7 @@ PGReserveSemaphores(int maxSemas, int port)
mySemaSets = (IpcSemaphoreId *)
malloc(maxSemaSets * sizeof(IpcSemaphoreId));
if (mySemaSets == NULL)
elog(PANIC, "Out of memory in PGReserveSemaphores");
elog(PANIC, "out of memory");
numSemaSets = 0;
nextSemaKey = port * 1000;
nextSemaNumber = SEMAS_PER_SET; /* force sema set alloc on 1st
@@ -355,7 +355,7 @@ PGSemaphoreCreate(PGSemaphore sema)
{
/* Time to allocate another semaphore set */
if (numSemaSets >= maxSemaSets)
elog(PANIC, "PGSemaphoreCreate: too many semaphores created");
elog(PANIC, "too many semaphores created");
mySemaSets[numSemaSets] = IpcSemaphoreCreate(SEMAS_PER_SET);
numSemaSets++;
nextSemaNumber = 0;

View File

@@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.11 2003/07/14 20:00:22 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.12 2003/07/22 23:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -181,7 +181,7 @@ IpcMemoryDetach(int status, Datum shmaddr)
DatumGetPointer(shmaddr), strerror(errno));
/*
* We used to report a failure via elog(WARNING), but that's pretty
* We used to report a failure via ereport(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}
@@ -198,7 +198,7 @@ IpcMemoryDelete(int status, Datum shmId)
DatumGetInt32(shmId), IPC_RMID, strerror(errno));
/*
* We used to report a failure via elog(WARNING), but that's pretty
* We used to report a failure via ereport(WARNING), but that's pretty
* pointless considering any client has long since disconnected ...
*/
}