mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
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
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user