17
17
18
18
19
19
static void usage (void );
20
- static void validateDirectoryOption (char * * dirpath ,
20
+ static void check_required_directory (char * * dirpath ,
21
21
char * envVarName , char * cmdLineOption , char * description );
22
22
23
23
@@ -203,13 +203,13 @@ parseCommandLine(int argc, char *argv[])
203
203
}
204
204
205
205
/* Get values from env if not already set */
206
- validateDirectoryOption (& old_cluster .bindir , "OLDBINDIR" , "-b" ,
206
+ check_required_directory (& old_cluster .bindir , "OLDBINDIR" , "-b" ,
207
207
"old cluster binaries reside" );
208
- validateDirectoryOption (& new_cluster .bindir , "NEWBINDIR" , "-B" ,
208
+ check_required_directory (& new_cluster .bindir , "NEWBINDIR" , "-B" ,
209
209
"new cluster binaries reside" );
210
- validateDirectoryOption (& old_cluster .pgdata , "OLDDATADIR" , "-d" ,
210
+ check_required_directory (& old_cluster .pgdata , "OLDDATADIR" , "-d" ,
211
211
"old cluster data resides" );
212
- validateDirectoryOption (& new_cluster .pgdata , "NEWDATADIR" , "-D" ,
212
+ check_required_directory (& new_cluster .pgdata , "NEWDATADIR" , "-D" ,
213
213
"new cluster data resides" );
214
214
}
215
215
@@ -272,9 +272,9 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
272
272
273
273
274
274
/*
275
- * validateDirectoryOption ()
275
+ * check_required_directory ()
276
276
*
277
- * Validates a directory option.
277
+ * Checks a directory option.
278
278
* dirpath - the directory name supplied on the command line
279
279
* envVarName - the name of an environment variable to get if dirpath is NULL
280
280
* 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);
284
284
* user hasn't provided the required directory name.
285
285
*/
286
286
static void
287
- validateDirectoryOption (char * * dirpath , char * envVarName ,
287
+ check_required_directory (char * * dirpath , char * envVarName ,
288
288
char * cmdLineOption , char * description )
289
289
{
290
290
if (* dirpath == NULL || strlen (* dirpath ) == 0 )
0 commit comments