|
23 | 23 | * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
24 | 24 | * Portions Copyright (c) 1994, Regents of the University of California
|
25 | 25 | *
|
26 |
| - * $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/pg_resetxlog.c,v 1.3 2001/03/22 03:59:10 momjian Exp $ |
| 26 | + * $Header: /cvsroot/pgsql/contrib/pg_resetxlog/Attic/pg_resetxlog.c,v 1.4 2001/05/30 14:18:18 momjian Exp $ |
27 | 27 | *
|
28 | 28 | *-------------------------------------------------------------------------
|
29 | 29 | */
|
|
92 | 92 |
|
93 | 93 |
|
94 | 94 | #define XLogFileName(path, log, seg) \
|
95 |
| - snprintf(path, MAXPGPATH, "%s%c%08X%08X", \ |
96 |
| - XLogDir, SEP_CHAR, log, seg) |
| 95 | + snprintf(path, MAXPGPATH, "%s/%08X%08X", \ |
| 96 | + XLogDir, log, seg) |
97 | 97 |
|
98 | 98 | /*
|
99 | 99 | * _INTL_MAXLOGRECSZ: max space needed for a record including header and
|
@@ -811,7 +811,7 @@ KillExistingXLOG(void)
|
811 | 811 | if (strlen(xlde->d_name) == 16 &&
|
812 | 812 | strspn(xlde->d_name, "0123456789ABCDEF") == 16)
|
813 | 813 | {
|
814 |
| - sprintf(path, "%s%c%s", XLogDir, SEP_CHAR, xlde->d_name); |
| 814 | + sprintf(path, "%s/%s", XLogDir, xlde->d_name); |
815 | 815 | if (unlink(path) < 0)
|
816 | 816 | {
|
817 | 817 | perror(path);
|
@@ -947,17 +947,16 @@ main(int argc, char **argv)
|
947 | 947 |
|
948 | 948 | DataDir = argv[argn++];
|
949 | 949 |
|
950 |
| - snprintf(XLogDir, MAXPGPATH, "%s%cpg_xlog", DataDir, SEP_CHAR); |
| 950 | + snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir); |
951 | 951 |
|
952 |
| - snprintf(ControlFilePath, MAXPGPATH, "%s%cglobal%cpg_control", |
953 |
| - DataDir, SEP_CHAR, SEP_CHAR); |
| 952 | + snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); |
954 | 953 |
|
955 | 954 | /*
|
956 | 955 | * Check for a postmaster lock file --- if there is one, refuse to
|
957 | 956 | * proceed, on grounds we might be interfering with a live
|
958 | 957 | * installation.
|
959 | 958 | */
|
960 |
| - snprintf(path, MAXPGPATH, "%s%cpostmaster.pid", DataDir, SEP_CHAR); |
| 959 | + snprintf(path, MAXPGPATH, "%s/postmaster.pid", DataDir); |
961 | 960 |
|
962 | 961 | if ((fd = open(path, O_RDONLY)) < 0)
|
963 | 962 | {
|
|
0 commit comments