Fix inconsistent message wording, and split off a couple of duplicated strings.
This commit is contained in:
parent
93190c3098
commit
015794541d
@ -42,7 +42,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
* Portions taken from FreeBSD.
|
* Portions taken from FreeBSD.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.150 2007/11/15 21:14:41 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.151 2007/11/16 21:47:32 alvherre Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -938,26 +938,31 @@ check_input(char *path)
|
|||||||
if (stat(path, &statbuf) != 0)
|
if (stat(path, &statbuf) != 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: file \"%s\" does not exist\n"
|
_("%s: file \"%s\" does not exist\n"), progname, path);
|
||||||
"This means you have a corrupted installation or identified\n"
|
fprintf(stderr,
|
||||||
"the wrong directory with the invocation option -L.\n"),
|
_("This might mean you have a corrupted installation or identified\n"
|
||||||
progname, path);
|
"the wrong directory with the invocation option -L.\n"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: could not access file \"%s\": %s\n"
|
_("%s: could not access file \"%s\": %s\n"), progname, path,
|
||||||
"This might mean you have a corrupted installation or identified\n"
|
strerror(errno));
|
||||||
"the wrong directory with the invocation option -L.\n"),
|
fprintf(stderr,
|
||||||
progname, path, strerror(errno));
|
_("This might mean you have a corrupted installation or identified\n"
|
||||||
|
"the wrong directory with the invocation option -L.\n"));
|
||||||
|
}
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (!S_ISREG(statbuf.st_mode))
|
if (!S_ISREG(statbuf.st_mode))
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: file \"%s\" is not a regular file\n"
|
_("%s: file \"%s\" is not a regular file\n"), progname, path);
|
||||||
"This means you have a corrupted installation or identified\n"
|
fprintf(stderr,
|
||||||
"the wrong directory with the invocation option -L.\n"),
|
_("This might mean you have a corrupted installation or identified\n"
|
||||||
progname, path);
|
"the wrong directory with the invocation option -L.\n"));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2958,11 +2963,13 @@ main(int argc, char *argv[])
|
|||||||
case 2:
|
case 2:
|
||||||
/* Present and not empty */
|
/* Present and not empty */
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: directory \"%s\" exists but is not empty\n"
|
_("%s: directory \"%s\" exists but is not empty\n"),
|
||||||
"If you want to create a new database system, either remove or empty\n"
|
progname, pg_data);
|
||||||
|
fprintf(stderr,
|
||||||
|
_("If you want to create a new database system, either remove or empty\n"
|
||||||
"the directory \"%s\" or run %s\n"
|
"the directory \"%s\" or run %s\n"
|
||||||
"with an argument other than \"%s\".\n"),
|
"with an argument other than \"%s\".\n"),
|
||||||
progname, pg_data, pg_data, progname, pg_data);
|
pg_data, progname, pg_data);
|
||||||
exit(1); /* no further message needed */
|
exit(1); /* no further message needed */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -3022,10 +3029,12 @@ main(int argc, char *argv[])
|
|||||||
case 2:
|
case 2:
|
||||||
/* Present and not empty */
|
/* Present and not empty */
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("%s: directory \"%s\" exists but is not empty\n"
|
_("%s: directory \"%s\" exists but is not empty\n"),
|
||||||
"If you want to store the transaction log there, either\n"
|
progname, xlog_dir);
|
||||||
|
fprintf(stderr,
|
||||||
|
_("If you want to store the transaction log there, either\n"
|
||||||
"remove or empty the directory \"%s\".\n"),
|
"remove or empty the directory \"%s\".\n"),
|
||||||
progname, xlog_dir, xlog_dir);
|
xlog_dir);
|
||||||
exit(1); /* no further message needed */
|
exit(1); /* no further message needed */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user