From 5ff678924e90c702349a6669dc1dd39dc6e43418 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 22 Nov 2005 20:05:48 +0000 Subject: tweak comments --- src/remove.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/remove.c') diff --git a/src/remove.c b/src/remove.c index f7954b434..4527b17d1 100644 --- a/src/remove.c +++ b/src/remove.c @@ -52,7 +52,7 @@ /* Define to the options that make open (or openat) fail to open a symlink. Define to 0 if there are no such options. - This is useful because it permits us to skip the `fstatat (".",...' + This is useful because it permits us to skip the `fstat' and dev/ino comparison in AD_push. */ #if defined O_NOFOLLOW # define OPEN_NO_FOLLOW_SYMLINK O_NOFOLLOW @@ -540,9 +540,9 @@ AD_push_initial (Dirstack_state *ds) active directory stack. DIR is the ./-relative name through which we've just `chdir'd to this directory. DIR_SB_FROM_PARENT is the result of calling lstat on DIR from the parent of DIR. - Return true upon success, false if fstatat "." fails, and longjump - (skipping the entire command line argument we're dealing with) if - someone has replaced DIR with e.g., a symlink to some other directory. */ + Longjump out (skipping the entire command line argument we're + dealing with) if `fstat (FD_CWD, ...' fails or if someone has + replaced DIR with e.g., a symlink to some other directory. */ static void AD_push (int fd_cwd, Dirstack_state *ds, char const *dir, struct stat const *dir_sb_from_parent) @@ -1206,7 +1206,7 @@ remove_dir (int fd_cwd, Dirstack_state *ds, char const *dir, (unlinkat, in our caller) and fd_to_subdirp's openat call. But on most systems, even those without openat, this isn't a problem, since we ensure that opening a symlink will fail, when that is possible. Otherwise, - fd_to_subdirp's fstat, along with the `fstatat (".",...' and the dev/ino + fd_to_subdirp's fstat, along with the `fstat' and the dev/ino comparison in AD_push ensure that we detect it and fail. */ DIR *dirp = fd_to_subdirp (fd_cwd, dir, x, 0, &dir_sb, ds, -- cgit v1.2.3-54-g00ecf