Displaying 6 results from an estimated 6 matches for "do_inotify_read".
2009 Aug 10
2
daemon/ warnings
...n/inotify.c
Avoid "comparison between signed and unsigned integer expressions"
warnings. If it's at all hard or risky to avoid this type of warning,
then it's not worthwhile. Here, it's easy and safe.
* daemon/inotify.c (inotify_posn): Declare local to be of unsigned type.
(do_inotify_read, do_inotify_files): Likewise.
---
daemon/inotify.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/daemon/inotify.c b/daemon/inotify.c
index 1b90f2b..8bb8ed2 100644
--- a/daemon/inotify.c
+++ b/daemon/inotify.c
@@ -33,7 +33,7 @@
static int inotify_fd = -1;
static...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...do_inotify_add_watch (const char *path, int mask)
return r;
#else
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (inotify, -1);
#endif
}
@@ -200,7 +200,7 @@ do_inotify_rm_watch (int wd)
return 0;
#else
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (inotify, -1);
#endif
}
@@ -314,7 +314,7 @@ do_inotify_read (void)
free (ret);
return NULL;
#else
- NOT_AVAILABLE (NULL);
+ NOT_AVAILABLE (inotify, NULL);
#endif
}
@@ -405,6 +405,6 @@ do_inotify_files (void)
unlink (tempfile);
return NULL;
#else
- NOT_AVAILABLE (NULL);
+ NOT_AVAILABLE (inotify, NULL);
#endif
}
diff --git a/daemon/luk...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...e_stringslen (filenames.argv, filenames.size);
return NULL;
}
- return filenames.argv;
+ return take_stringsbuf (&filenames);
}
char *
diff --git a/daemon/inotify.c b/daemon/inotify.c
index 562365b..277c94c 100644
--- a/daemon/inotify.c
+++ b/daemon/inotify.c
@@ -307,7 +307,7 @@ do_inotify_read (void)
char **
do_inotify_files (void)
{
- DECLARE_STRINGSBUF (ret);
+ CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret);
unsigned int i;
FILE *fp = NULL;
guestfs_int_inotify_event_list *events;
@@ -380,7 +380,7 @@ do_inotify_files (void)
goto error;
unlink (tempfile);
- ret...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it,
as that string would have been owned by the stringbuf.
Adapt few places to this behaviour.
---
daemon/btrfs.c | 4 +---
daemon/devsparts.c | 8 ++++----
daemon/guestfsd.c | 1 +
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 9b52aa8..d70565a 100644
---
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...fo,
- size_t n, int *argtypes, int *size)
+ size_t n, int *argtypes, int *size)
{
if (n > 0) {
argtypes[0] = PA_STRING;
diff --git a/daemon/inotify.c b/daemon/inotify.c
index 43f282d..4bc6f17 100644
--- a/daemon/inotify.c
+++ b/daemon/inotify.c
@@ -165,10 +165,10 @@ do_inotify_read (void)
int n, r;
r = read (inotify_fd, inotify_buf + inotify_posn,
- sizeof (inotify_buf) - inotify_posn);
+ sizeof (inotify_buf) - inotify_posn);
if (r == -1) {
if (errno == EWOULDBLOCK || errno == EAGAIN) /* End of list. */
- break;
+ break;...