|
|
@ -6,7 +6,7 @@ |
|
|
|
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; |
|
|
|
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; |
|
|
|
* licence: BSD |
|
|
|
* licence: BSD |
|
|
|
* |
|
|
|
* |
|
|
|
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.40 2008/09/23 09:20:37 heikki Exp $ |
|
|
|
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.41 2008/09/24 08:59:42 mha Exp $ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#include "postgres_fe.h" |
|
|
|
#include "postgres_fe.h" |
|
|
|
|
|
|
|
|
|
|
@ -107,7 +107,7 @@ main(int argc, char *argv[]) |
|
|
|
|
|
|
|
|
|
|
|
snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); |
|
|
|
snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); |
|
|
|
|
|
|
|
|
|
|
|
if ((fd = open(ControlFilePath, O_RDONLY, 0)) == -1) |
|
|
|
if ((fd = open(ControlFilePath, O_RDONLY | PG_BINARY, 0)) == -1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"), |
|
|
|
fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"), |
|
|
|
progname, ControlFilePath, strerror(errno)); |
|
|
|
progname, ControlFilePath, strerror(errno)); |
|
|
|