aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-08-13 08:51:17 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-08-13 08:51:17 +0300
commitb65ef6179a6d84f8a6290a8268acc8e675b32d95 (patch)
tree4e495727d7d9ac3c492292d63e54bc79f4bf2e47
parentde0a2f0f8abdac9596db9c44c788b3acdcac39f4 (diff)
downloaddirevent-b65ef6179a6d84f8a6290a8268acc8e675b32d95.tar.gz
direvent-b65ef6179a6d84f8a6290a8268acc8e675b32d95.tar.bz2
Fix comments
-rw-r--r--src/watcher.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/watcher.c b/src/watcher.c
index 7275640..dc07643 100644
--- a/src/watcher.c
+++ b/src/watcher.c
@@ -213,10 +213,12 @@ deliver_ev_create(struct dirwatcher *dp, const char *name)
213 213
214/* Check if a new watcher must be created and create it if so. 214/* Check if a new watcher must be created and create it if so.
215 215
216 A watcher must be created if its parent's autowatch has a non-null 216 A watcher must be created if its parent's recursion depth has a non-null
217 value. If it has a negative value, it will be inherited by the new 217 value. If it has a negative value, which means "recursively watch new
218 watcher. Otherwise, the new watcher will inherit the parent's autowatch 218 subdirectories without limit on their nesting level", it will be inherited
219 decreased by one. 219 by the new watcher. Otherwise, the new watcher will inherit the parent's
220 depth decreased by one, thus eventually cutting off creation of new
221 watchers.
220 222
221 Return 0 on success, -1 on error. 223 Return 0 on success, -1 on error.
222*/ 224*/
@@ -267,7 +269,7 @@ dirwatcher_pattern_match(struct dirwatcher *dwp, const char *file_name)
267} 269}
268 270
269/* Recursively scan subdirectories of parent and add them to the 271/* Recursively scan subdirectories of parent and add them to the
270 watcher list, as requested by the parent's autowatch value. */ 272 watcher list, as requested by the parent's recursion depth value. */
271static int 273static int
272watch_subdirs(struct dirwatcher *parent, int notify) 274watch_subdirs(struct dirwatcher *parent, int notify)
273{ 275{
@@ -299,7 +301,8 @@ watch_subdirs(struct dirwatcher *parent, int notify)
299 301
300 dirname = mkfilename(parent->dirname, ent->d_name); 302 dirname = mkfilename(parent->dirname, ent->d_name);
301 if (!dirname) { 303 if (!dirname) {
302 diag(LOG_ERR, _("cannot stat %s/%s: not enough memory"), 304 diag(LOG_ERR,
305 _("cannot stat %s/%s: not enough memory"),
303 parent->dirname, ent->d_name); 306 parent->dirname, ent->d_name);
304 continue; 307 continue;
305 } 308 }

Return to:

Send suggestions and report system problems to the System administrator.