[tracker/rss-enclosures] libinotify: Add perror() calls.
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libinotify: Add perror() calls.
- Date: Mon, 3 May 2010 00:45:10 +0000 (UTC)
commit 3683c23b5b39af17c22fb486f76341566217bbf1
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Apr 26 14:26:25 2010 +0200
libinotify: Add perror() calls.
This is so we get a clue of what went wrong when adding a monitor,
like in bug #615965.
src/libinotify/inotify-monitor.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/libinotify/inotify-monitor.c b/src/libinotify/inotify-monitor.c
index b120352..b8c5cb3 100644
--- a/src/libinotify/inotify-monitor.c
+++ b/src/libinotify/inotify-monitor.c
@@ -146,11 +146,17 @@ inotify_monitor_add_raw( INotifyHandle *inh )
#ifdef IN_MASK_ADD
wd = inotify_add_watch( inotify_monitor_fd, filename, mask | IN_MASK_ADD );
+
+ if( wd < 0 )
+ perror ("Adding INotify watch:");
#else
wd = inotify_add_watch( inotify_monitor_fd, filename, mask );
if( wd < 0 )
- return -1;
+ {
+ perror ("Adding INotify watch:");
+ return -1;
+ }
needmask = mask | inotify_listhash_get_mask( wd );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]