|
42 | 42 | * Portions Copyright (c) 1994, Regents of the University of California
|
43 | 43 | * Portions taken from FreeBSD.
|
44 | 44 | *
|
45 |
| - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.150 2007/11/15 21:14:41 momjian Exp $ |
| 45 | + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.151 2007/11/16 21:47:32 alvherre Exp $ |
46 | 46 | *
|
47 | 47 | *-------------------------------------------------------------------------
|
48 | 48 | */
|
@@ -938,26 +938,31 @@ check_input(char *path)
|
938 | 938 | if (stat(path, &statbuf) != 0)
|
939 | 939 | {
|
940 | 940 | if (errno == ENOENT)
|
| 941 | + { |
| 942 | + fprintf(stderr, |
| 943 | + _("%s: file \"%s\" does not exist\n"), progname, path); |
941 | 944 | fprintf(stderr,
|
942 |
| - _("%s: file \"%s\" does not exist\n" |
943 |
| - "This means you have a corrupted installation or identified\n" |
944 |
| - "the wrong directory with the invocation option -L.\n"), |
945 |
| - progname, path); |
| 945 | + _("This might mean you have a corrupted installation or identified\n" |
| 946 | + "the wrong directory with the invocation option -L.\n")); |
| 947 | + } |
946 | 948 | else
|
| 949 | + { |
947 | 950 | fprintf(stderr,
|
948 |
| - _("%s: could not access file \"%s\": %s\n" |
949 |
| - "This might mean you have a corrupted installation or identified\n" |
950 |
| - "the wrong directory with the invocation option -L.\n"), |
951 |
| - progname, path, strerror(errno)); |
| 951 | + _("%s: could not access file \"%s\": %s\n"), progname, path, |
| 952 | + strerror(errno)); |
| 953 | + fprintf(stderr, |
| 954 | + _("This might mean you have a corrupted installation or identified\n" |
| 955 | + "the wrong directory with the invocation option -L.\n")); |
| 956 | + } |
952 | 957 | exit(1);
|
953 | 958 | }
|
954 | 959 | if (!S_ISREG(statbuf.st_mode))
|
955 | 960 | {
|
956 | 961 | fprintf(stderr,
|
957 |
| - _("%s: file \"%s\" is not a regular file\n" |
958 |
| - "This means you have a corrupted installation or identified\n" |
959 |
| - "the wrong directory with the invocation option -L.\n"), |
960 |
| - progname, path); |
| 962 | + _("%s: file \"%s\" is not a regular file\n"), progname, path); |
| 963 | + fprintf(stderr, |
| 964 | + _("This might mean you have a corrupted installation or identified\n" |
| 965 | + "the wrong directory with the invocation option -L.\n")); |
961 | 966 | exit(1);
|
962 | 967 | }
|
963 | 968 | }
|
@@ -2958,11 +2963,13 @@ main(int argc, char *argv[])
|
2958 | 2963 | case 2:
|
2959 | 2964 | /* Present and not empty */
|
2960 | 2965 | fprintf(stderr,
|
2961 |
| - _("%s: directory \"%s\" exists but is not empty\n" |
2962 |
| - "If you want to create a new database system, either remove or empty\n" |
| 2966 | + _("%s: directory \"%s\" exists but is not empty\n"), |
| 2967 | + progname, pg_data); |
| 2968 | + fprintf(stderr, |
| 2969 | + _("If you want to create a new database system, either remove or empty\n" |
2963 | 2970 | "the directory \"%s\" or run %s\n"
|
2964 | 2971 | "with an argument other than \"%s\".\n"),
|
2965 |
| - progname, pg_data, pg_data, progname, pg_data); |
| 2972 | + pg_data, progname, pg_data); |
2966 | 2973 | exit(1); /* no further message needed */
|
2967 | 2974 |
|
2968 | 2975 | default:
|
@@ -3022,10 +3029,12 @@ main(int argc, char *argv[])
|
3022 | 3029 | case 2:
|
3023 | 3030 | /* Present and not empty */
|
3024 | 3031 | fprintf(stderr,
|
3025 |
| - _("%s: directory \"%s\" exists but is not empty\n" |
3026 |
| - "If you want to store the transaction log there, either\n" |
| 3032 | + _("%s: directory \"%s\" exists but is not empty\n"), |
| 3033 | + progname, xlog_dir); |
| 3034 | + fprintf(stderr, |
| 3035 | + _("If you want to store the transaction log there, either\n" |
3027 | 3036 | "remove or empty the directory \"%s\".\n"),
|
3028 |
| - progname, xlog_dir, xlog_dir); |
| 3037 | + xlog_dir); |
3029 | 3038 | exit(1); /* no further message needed */
|
3030 | 3039 |
|
3031 | 3040 | default:
|
|
0 commit comments