summaryrefslogtreecommitdiff
path: root/src/pwd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-11-19 21:36:00 +0000
committerJim Meyering <jim@meyering.net>2004-11-19 21:36:00 +0000
commit273e13d35be6e96200c23d0040ccb3a6f468d97e (patch)
tree2d57fc0b9600f4e7f9d86375518d922290761cab /src/pwd.c
parentd12ad922570161bd5010e6bcba43881ba49ef58a (diff)
downloadcoreutils-273e13d35be6e96200c23d0040ccb3a6f468d97e.tar.xz
(find_dir_entry): Update comment to match reality.
Diffstat (limited to 'src/pwd.c')
-rw-r--r--src/pwd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pwd.c b/src/pwd.c
index 193cf4a0c..96b301396 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -140,15 +140,16 @@ nth_parent (size_t n)
return buf;
}
-/* Return the basename of the current directory, where DOT_SB is the
- result of lstat'ing ".".
+/* Determine the basename of the current directory, where DOT_SB is the
+ result of lstat'ing "." and prepend that to the file name in *PATH.
Find the directory entry in `..' that matches the dev/i-node of DOT_SB.
Upon success, update *DOT_SB with stat information of `..', chdir to `..',
and prepend "/basename" to PATH.
Otherwise, exit with a diagnostic.
PARENT_HEIGHT is the number of levels `..' is above the starting directory.
The first time this function is called (from the initial directory),
- PARENT_HEIGHT is 1. This is solely for diagnostics. */
+ PARENT_HEIGHT is 1. This is solely for diagnostics.
+ Exit nonzero upon error. */
static void
find_dir_entry (struct stat *dot_sb, struct Path *path, size_t parent_height)