aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/option.c')
-rw-r--r--src/bin/pg_upgrade/option.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c
index e75be2c423e..0954b75ec07 100644
--- a/src/bin/pg_upgrade/option.c
+++ b/src/bin/pg_upgrade/option.c
@@ -97,7 +97,7 @@ parseCommandLine(int argc, char *argv[])
/* Allow help and version to be run as root, so do the test here. */
if (os_user_effective_id == 0)
- pg_fatal("%s: cannot be run as root\n", os_info.progname);
+ pg_fatal("%s: cannot be run as root", os_info.progname);
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:kNo:O:p:P:rs:U:v",
long_options, &optindex)) != -1)
@@ -164,12 +164,12 @@ parseCommandLine(int argc, char *argv[])
case 'p':
if ((old_cluster.port = atoi(optarg)) <= 0)
- pg_fatal("invalid old port number\n");
+ pg_fatal("invalid old port number");
break;
case 'P':
if ((new_cluster.port = atoi(optarg)) <= 0)
- pg_fatal("invalid new port number\n");
+ pg_fatal("invalid new port number");
break;
case 'r':
@@ -202,10 +202,10 @@ parseCommandLine(int argc, char *argv[])
}
if (optind < argc)
- pg_fatal("too many command-line arguments (first is \"%s\")\n", argv[optind]);
+ pg_fatal("too many command-line arguments (first is \"%s\")", argv[optind]);
if (log_opts.verbose)
- pg_log(PG_REPORT, "Running in verbose mode\n");
+ pg_log(PG_REPORT, "Running in verbose mode");
log_opts.isatty = isatty(fileno(stdout));
@@ -248,10 +248,10 @@ parseCommandLine(int argc, char *argv[])
canonicalize_path(new_cluster_pgdata);
if (!getcwd(cwd, MAXPGPATH))
- pg_fatal("could not determine current directory\n");
+ pg_fatal("could not determine current directory");
canonicalize_path(cwd);
if (path_is_prefix_of_path(new_cluster_pgdata, cwd))
- pg_fatal("cannot run pg_upgrade from inside the new cluster data directory on Windows\n");
+ pg_fatal("cannot run pg_upgrade from inside the new cluster data directory on Windows");
}
#endif
}
@@ -347,14 +347,14 @@ check_required_directory(char **dirpath, const char *envVarName, bool useCwd,
char cwd[MAXPGPATH];
if (!getcwd(cwd, MAXPGPATH))
- pg_fatal("could not determine current directory\n");
+ pg_fatal("could not determine current directory");
*dirpath = pg_strdup(cwd);
}
else if (missingOk)
return;
else
pg_fatal("You must identify the directory where the %s.\n"
- "Please use the %s command-line option or the %s environment variable.\n",
+ "Please use the %s command-line option or the %s environment variable.",
description, cmdLineOption, envVarName);
}
@@ -419,7 +419,7 @@ adjust_data_dir(ClusterInfo *cluster)
if ((output = popen(cmd, "r")) == NULL ||
fgets(cmd_output, sizeof(cmd_output), output) == NULL)
- pg_fatal("could not get data directory using %s: %s\n",
+ pg_fatal("could not get data directory using %s: %s",
cmd, strerror(errno));
pclose(output);
@@ -462,7 +462,7 @@ get_sock_dir(ClusterInfo *cluster, bool live_check)
snprintf(filename, sizeof(filename), "%s/postmaster.pid",
cluster->pgdata);
if ((fp = fopen(filename, "r")) == NULL)
- pg_fatal("could not open file \"%s\": %s\n",
+ pg_fatal("could not open file \"%s\": %s",
filename, strerror(errno));
for (lineno = 1;
@@ -470,7 +470,7 @@ get_sock_dir(ClusterInfo *cluster, bool live_check)
lineno++)
{
if (fgets(line, sizeof(line), fp) == NULL)
- pg_fatal("could not read line %d from file \"%s\": %s\n",
+ pg_fatal("could not read line %d from file \"%s\": %s",
lineno, filename, strerror(errno));
/* potentially overwrite user-supplied value */
@@ -487,7 +487,7 @@ get_sock_dir(ClusterInfo *cluster, bool live_check)
/* warn of port number correction */
if (orig_port != DEF_PGUPORT && old_cluster.port != orig_port)
- pg_log(PG_WARNING, "user-supplied old port number %hu corrected to %hu\n",
+ pg_log(PG_WARNING, "user-supplied old port number %hu corrected to %hu",
orig_port, cluster->port);
}
#else /* !HAVE_UNIX_SOCKETS || WIN32 */