aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-09 10:45:38 +0100
committerMax Kellermann <max@duempel.org>2014-02-09 10:46:39 +0100
commite29a8b3a9c685239ec2ccc89518aff3acd128a8c (patch)
tree5fd012df9cd269f2c70f93857c28c5acd927f94c /src
parentace3f37af4703718e5eda48ad5de7a23b083b58a (diff)
downloadmpd-e29a8b3a9c685239ec2ccc89518aff3acd128a8c.tar.gz
mpd-e29a8b3a9c685239ec2ccc89518aff3acd128a8c.tar.xz
mpd-e29a8b3a9c685239ec2ccc89518aff3acd128a8c.zip
db/update/Walk: document FindAncestorLoop()
Diffstat (limited to 'src')
-rw-r--r--src/db/update/Walk.cxx6
1 files changed, 6 insertions, 0 deletions
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)