diff options
Diffstat (limited to 'src/bin/pg_controldata/pg_controldata.c')
| -rw-r--r-- | src/bin/pg_controldata/pg_controldata.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index d89a934dfc..77f61af06f 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -6,7 +6,7 @@ * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; * licence: BSD * - * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.23 2005/04/28 21:47:16 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.24 2005/06/02 05:55:29 tgl Exp $ */ #include "postgres.h" @@ -66,7 +66,7 @@ main(int argc, char *argv[]) int fd; char ControlFilePath[MAXPGPATH]; char *DataDir; - crc64 crc; + pg_crc32 crc; char pgctime_str[128]; char ckpttime_str[128]; char sysident_str[32]; @@ -120,13 +120,13 @@ main(int argc, char *argv[]) close(fd); /* Check the CRC. */ - INIT_CRC64(crc); - COMP_CRC64(crc, - (char *) &ControlFile + sizeof(crc64), - sizeof(ControlFileData) - sizeof(crc64)); - FIN_CRC64(crc); + INIT_CRC32(crc); + COMP_CRC32(crc, + (char *) &ControlFile, + offsetof(ControlFileData, crc)); + FIN_CRC32(crc); - if (!EQ_CRC64(crc, ControlFile.crc)) + if (!EQ_CRC32(crc, ControlFile.crc)) printf(_("WARNING: Calculated CRC checksum does not match value stored in file.\n" "Either the file is corrupt, or it has a different layout than this program\n" "is expecting. The results below are untrustworthy.\n\n")); |
