1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-09 14:33:17 +02:00

Fix typo and cleanup.

git-svn-id: http://pg-rman.googlecode.com/svn/trunk@26 182aca00-e38e-11de-a668-6fd11605f5ce
This commit is contained in:
itagaki.takahiro 2009-12-22 22:47:10 +00:00
parent 59d0911fa7
commit 182444045c
4 changed files with 8 additions and 7 deletions

2
dir.c
View File

@ -39,7 +39,7 @@ dir_create_dir(const char *dir, mode_t mode)
char *parent;
strncpy(copy, dir, MAXPGPATH);
parent= dirname(copy);
parent = dirname(copy);
if (access(parent, F_OK) == -1)
dir_create_dir(parent, mode);
if (mkdir(dir, mode) == -1)

View File

@ -95,7 +95,7 @@ typedef enum BackupStatus
typedef enum BackupMode
{
BACKUP_MODE_INVALID,
BACKUP_MODE_ARCHIVE, /* arhicve only */
BACKUP_MODE_ARCHIVE, /* archive only */
BACKUP_MODE_INCREMENTAL, /* incremental backup */
BACKUP_MODE_FULL /* full backup */
} BackupMode;
@ -280,6 +280,7 @@ extern bool is_pg_running(void);
else \
(logSeg)++; \
} while (0)
#define MAXFNAMELEN 64
#define XLogFileName(fname, tli, log, seg) \
snprintf(fname, MAXFNAMELEN, "%08X%08X%08X", tli, log, seg)

View File

@ -281,7 +281,7 @@ base_backup_found:
elog(INFO, _("restore complete. Recovery starts automatically when the PostgreSQL server is started."));
return 0;
}
}
/*
* Validate and restore backup.
@ -327,7 +327,7 @@ restore_database(pgBackup *backup)
/* keep orginal directory */
if (getcwd(pwd, sizeof(pwd)) == NULL)
elog(ERROR_SYSTEM, _("can't get current working directoryh: %s"),
elog(ERROR_SYSTEM, _("can't get current working directory: %s"),
strerror(errno));
/* create pgdata directory */
@ -335,7 +335,7 @@ restore_database(pgBackup *backup)
/* change directory to pgdata */
if (chdir(pgdata))
elog(ERROR_SYSTEM, _("can't change directoryh: %s"),
elog(ERROR_SYSTEM, _("can't change directory: %s"),
strerror(errno));
/* Execute mkdirs.sh */
@ -346,7 +346,7 @@ restore_database(pgBackup *backup)
/* go back to original directory */
if (chdir(pwd))
elog(ERROR_SYSTEM, _("can't change directoryh: %s"),
elog(ERROR_SYSTEM, _("can't change directory: %s"),
strerror(errno));
}

2
xlog.c
View File

@ -104,12 +104,12 @@ bool
xlog_logfname2lsn(const char *logfname, XLogRecPtr *lsn)
{
uint32 tli;
if (sscanf(logfname, "%08X%08X%08X",
&tli, &lsn->xlogid, &lsn->xrecoff) != 3)
return false;
lsn->xrecoff *= XLogSegSize;
return true;
}