From e29a8b3a9c685239ec2ccc89518aff3acd128a8c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 9 Feb 2014 10:45:38 +0100 Subject: db/update/Walk: document FindAncestorLoop() --- src/db/update/Walk.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/db/update') diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index 55a275748..44b10e2bd 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -152,6 +152,12 @@ update_directory_stat(Storage &storage, Directory &directory) } #endif +/** + * Check the ancestors of the given #Directory and see if there's one + * with the same device/inode number, building a loop. + * + * @return 1 if a loop was found, 0 if not, -1 on I/O error + */ static int FindAncestorLoop(Storage &storage, Directory *parent, unsigned inode, unsigned device) -- cgit v1.2.3