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:
parent
59d0911fa7
commit
182444045c
2
dir.c
2
dir.c
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user