diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2004-11-09 15:57:57 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2004-11-09 15:57:57 +0000 |
| commit | e9c05281b5991ad5937cc14579dfff79499d6786 (patch) | |
| tree | a03b8a046cf3727660f450f8b538aafa9b4ab63c /src/bin/initdb | |
| parent | 960f545041bc3c6a7536d4ee8328c087c52616b3 (diff) | |
| download | postgresql-e9c05281b5991ad5937cc14579dfff79499d6786.tar.gz | |
Get rid of perror(), substitute some better phrased error messages.
malloc() doesn't set errno, so most uses were buggy anyway.
Diffstat (limited to 'src/bin/initdb')
| -rw-r--r-- | src/bin/initdb/initdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index d9d8e0d480..1c2286372e 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -39,7 +39,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.65 2004/10/24 15:55:29 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.66 2004/11/09 15:57:52 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2472,7 +2472,8 @@ main(int argc, char *argv[]) if (chmod(pg_data, 0700) != 0) { - perror(pg_data); + fprintf(stderr, _("%s: could not change permissions of directory »%s«: %s\n"), + progname, pg_data, strerror(errno)); exit_nicely(); } else @@ -2493,7 +2494,8 @@ main(int argc, char *argv[]) default: /* Trouble accessing directory */ - perror(pg_data); + fprintf(stderr, _("%s: could not access directory »%s«: %s\n"), + progname, pg_data, strerror(errno)); exit_nicely(); } |
