summaryrefslogtreecommitdiff
path: root/old
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-01 15:52:27 +0000
committerJim Meyering <jim@meyering.net>2001-11-01 15:52:27 +0000
commit186af758eb4f4502cdc30cd60f4f6af0bc298777 (patch)
treee2630ced548ab17a08090345ab09df0a7ea14470 /old
parentc4dbc53ec40646d75dd314b3d44237cc05f4b2e0 (diff)
downloadcoreutils-186af758eb4f4502cdc30cd60f4f6af0bc298777.tar.xz
*** empty log message ***
Diffstat (limited to 'old')
-rw-r--r--old/fileutils/ChangeLog17
1 files changed, 16 insertions, 1 deletions
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index 6433f0154..a56cbb461 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -2,6 +2,21 @@
* Version 4.1.1.
+ * src/ls.c (struct pending) [st_ino, st_dev]: Remove members.
+ (queue_directory): Remove just-added 3rd parameter
+ and associated code, and update callers.
+ (print_dir): Get dev/inode pair via `fstat (dirfd (reading), ...',
+ and call visit_dir to detect cycles here.
+ Push the dev/inode pair onto the new stack.
+ (dev_ino_obstack): New global.
+ (DEV_INO_PUSH): New macro.
+ (dev_ino_pop): New function.
+ (ASSERT_MATCHING_DEV_INO): New macro.
+ (visit_dir): Take two parameters (dev,ino), not one `pending'.
+ (main): Initialized the dev_ino_obstack.
+ Don't call visit_dir here.
+ Get the dev/ino pair from the new stack, not from the pending entry.
+
Make ls -R detect directory cycles.
Add loop detection without incurring an additional stat call per
directory processed. To detect loops efficiently (i.e., time: +O(1)
@@ -16,7 +31,7 @@
is closed, I must either save the dev/ino someplace (pending seemed
logical) or recompute them via stat.
- A subsequent change will convert to using a stack of dev/ino pairs
+ The following change will convert to using a stack of dev/ino pairs
instead, pushing an entry when doing the opendir (use fstat on
dirfd (reading)), and popping (when encountering a marker) to get
the dev/ino pair to be removed from the hash table.