pgsql: Improve pg_check_dir code and comments.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve pg_check_dir code and comments.
Date: 2015-02-17 15:57:17
Message-ID: E1YNkWT-0004hb-7q@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve pg_check_dir code and comments.

Avoid losing errno if readdir() fails and closedir() works. Consistently
return 4 rather than 3 if both a lost+found directory and other files are
found, rather than returning one value or the other depending on the
order of the directory listing. Update comments to match the actual
behavior.

These oversights date to commits 6f03927fce038096f53ca67eeab9adb24938f8a6
and 17f15239325a88581bb4f9cf91d38005f1f52d69.

Marco Nenciarini

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9a90ec9cff34168994f5d544c2c3cc1b1ae21277

Modified Files
--------------
src/port/pgcheckdir.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-02-17 16:12:06 pgsql: Improve pg_check_dir's handling of closedir() failures.
Previous Message Robert Haas 2015-02-17 15:49:28 Re: pgsql: Improve pg_check_dir code and comments.