aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-24 21:03:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-24 21:03:42 +0000
commitb15f9b08efb0665f0c145ebf928b7e11c0a602ed (patch)
tree3921a026032a8ff2f1f61f49361d2c67f949312b /src/backend/bootstrap/bootstrap.c
parentb5b9e33564b453c6c15495b8eb93d988a22cdf3c (diff)
downloadpostgresql-b15f9b08efb0665f0c145ebf928b7e11c0a602ed.tar.gz
postgresql-b15f9b08efb0665f0c145ebf928b7e11c0a602ed.zip
Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32. Also, add a security check on Win32 that parallels the can't-run-as-root check on Unix. Magnus Hagander
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 553cf79dd0b..ccf0595835e 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.184 2004/06/06 00:41:26 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.185 2004/06/24 21:02:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -328,12 +328,11 @@ BootstrapMain(int argc, char *argv[])
{
if (!potential_DataDir)
{
- fprintf(stderr,
- gettext("%s does not know where to find the database system data.\n"
- "You must specify the directory that contains the database system\n"
- "either by specifying the -D invocation option or by setting the\n"
- "PGDATA environment variable.\n"),
- argv[0]);
+ write_stderr("%s does not know where to find the database system data.\n"
+ "You must specify the directory that contains the database system\n"
+ "either by specifying the -D invocation option or by setting the\n"
+ "PGDATA environment variable.\n",
+ argv[0]);
proc_exit(1);
}
SetDataDir(potential_DataDir);
@@ -503,15 +502,14 @@ BootstrapMain(int argc, char *argv[])
static void
usage(void)
{
- fprintf(stderr,
- gettext("Usage:\n"
+ write_stderr("Usage:\n"
" postgres -boot [OPTION]... DBNAME\n"
" -c NAME=VALUE set run-time parameter\n"
" -d 1-5 debug level\n"
" -D datadir data directory\n"
" -F turn off fsync\n"
" -o file send debug output to file\n"
- " -x num internal use\n"));
+ " -x num internal use\n");
proc_exit(1);
}