changeset 14722:06595c2be4df

openat: correct new comment * lib/openat-proc.c (openat_proc_name): Correct the comment.
author Bastien Roucariès <roucaries.bastien@gmail.com>
date Tue, 10 May 2011 11:30:19 +0200
parents 8230401f6111
children 890d9b0fe421
files ChangeLog lib/openat-proc.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-10  Bastien Roucariès  <roucaries.bastien@gmail.com>
+
+	openat: correct new comment
+	* lib/openat-proc.c (openat_proc_name): Correct the comment.
+
 2011-05-10  Jim Meyering  <meyering@redhat.com>
 
 	openat: add comments
--- a/lib/openat-proc.c
+++ b/lib/openat-proc.c
@@ -80,10 +80,11 @@
         proc_status = -1;
       else
         {
-          /* Detect whether /proc/self/fd/../fd exists.  On Linux, that name
-             resolves to /proc/self/fd, which was opened above.  However, on
-             Solaris, it may resolve to /proc/self/fd/fd, which cannot exist,
-             since all names in /proc/self/fd are numeric.  */
+          /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the
+             number of a file descriptor open on /proc/self/fd.  On Linux,
+             that name resolves to /proc/self/fd, which was opened above.
+             However, on Solaris, it may resolve to /proc/self/fd/fd, which
+             cannot exist, since all names in /proc/self/fd are numeric.  */
           char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)];
           sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd");
           proc_status = access (dotdot_buf, F_OK) ? -1 : 1;