]> granicus.if.org Git - postgresql/commitdiff
Rename pg_upgrade directory validation function, for clarity.
authorBruce Momjian <bruce@momjian.us>
Wed, 22 Jun 2011 21:50:40 +0000 (17:50 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 22 Jun 2011 21:50:40 +0000 (17:50 -0400)
contrib/pg_upgrade/check.c
contrib/pg_upgrade/option.c

index 377dea2b6f758fba8ba53f7713b7e2e640b547f5..34d0a1b073ea4796306621b4ae720643dca91f93 100644 (file)
@@ -393,8 +393,7 @@ check_old_cluster_has_new_cluster_dbs(void)
  *     This is particularly useful for tablespace deletion.
  */
 void
-create_script_for_old_cluster_deletion(
-                                                                          char **deletion_script_file_name)
+create_script_for_old_cluster_deletion(char **deletion_script_file_name)
 {
        FILE       *script = NULL;
        int                     tblnum;
index 18ce9d7732e1d0c1834407bcdd9d6c809bba9300..4401a81562b647eabafb9fd5ea8c3aaa105c8a95 100644 (file)
@@ -17,7 +17,7 @@
 
 
 static void usage(void);
-static void validateDirectoryOption(char **dirpath,
+static void check_required_directory(char **dirpath,
                                   char *envVarName, char *cmdLineOption, char *description);
 
 
@@ -203,13 +203,13 @@ parseCommandLine(int argc, char *argv[])
        }
 
        /* Get values from env if not already set */
-       validateDirectoryOption(&old_cluster.bindir, "OLDBINDIR", "-b",
+       check_required_directory(&old_cluster.bindir, "OLDBINDIR", "-b",
                                                        "old cluster binaries reside");
-       validateDirectoryOption(&new_cluster.bindir, "NEWBINDIR", "-B",
+       check_required_directory(&new_cluster.bindir, "NEWBINDIR", "-B",
                                                        "new cluster binaries reside");
-       validateDirectoryOption(&old_cluster.pgdata, "OLDDATADIR", "-d",
+       check_required_directory(&old_cluster.pgdata, "OLDDATADIR", "-d",
                                                        "old cluster data resides");
-       validateDirectoryOption(&new_cluster.pgdata, "NEWDATADIR", "-D",
+       check_required_directory(&new_cluster.pgdata, "NEWDATADIR", "-D",
                                                        "new cluster data resides");
 }
 
@@ -272,9 +272,9 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
 
 
 /*
- * validateDirectoryOption()
+ * check_required_directory()
  *
- * Validates a directory option.
+ * Checks a directory option.
  *     dirpath           - the directory name supplied on the command line
  *     envVarName        - the name of an environment variable to get if dirpath is NULL
  *     cmdLineOption - the command line option corresponds to this directory (-o, -O, -n, -N)
@@ -284,7 +284,7 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
  * user hasn't provided the required directory name.
  */
 static void
-validateDirectoryOption(char **dirpath, char *envVarName,
+check_required_directory(char **dirpath, char *envVarName,
                                                char *cmdLineOption, char *description)
 {
        if (*dirpath == NULL || strlen(*dirpath) == 0)