convert from svn repository: remove tags directory
[lttv.git] / trunk / ltt-control / lttd / lttd.c
index 30c7084cb7577077a47821d9e16bf5eca923d500..ceae377bd75f48cde76d8c0361ae30569d2c35f1 100644 (file)
@@ -51,7 +51,8 @@
 #define RELAY_GET_SUBBUF_SIZE   _IOR(0xF5, 0x03,__u32)
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
-#include <linux/inotify.h>
+#include <sys/inotify.h>
+#if 0  /* should now be provided by libc. */
 /* From the inotify-tools 2.6 package */
 static inline int inotify_init (void)
 {
@@ -67,6 +68,7 @@ static inline int inotify_rm_watch (int fd, __u32 wd)
 {
        return syscall (__NR_inotify_rm_watch, fd, wd);
 }
+#endif //0
 #define HAS_INOTIFY
 #else
 static inline int inotify_init (void)
@@ -918,7 +920,11 @@ int channels_init()
        if(ret = open_channel_trace_pairs(channel_name, trace_name, &fd_pairs,
                        &inotify_fd, &inotify_watch_array))
                goto close_channel;
-
+       if (fd_pairs.num_pairs == 0) {
+               printf("No channel available for reading, exiting\n");
+               ret = -ENOENT;
+               goto close_channel;
+       }
        if(ret = map_channels(&fd_pairs, 0, fd_pairs.num_pairs))
                goto close_channel;
        return 0;
This page took 0.023494 seconds and 4 git commands to generate.