search for: guestfs_int_inotify_event_list

Displaying 9 results from an estimated 9 matches for "guestfs_int_inotify_event_list".

2014 Sep 23
1
Re: [PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check
...x inotify implementation relies on it... > > diff --git a/daemon/inotify.c b/daemon/inotify.c > index 36e5ede..b847b7d 100644 > --- a/daemon/inotify.c > +++ b/daemon/inotify.c > @@ -309,7 +309,7 @@ do_inotify_files (void) > unsigned int i; > FILE *fp = NULL; > guestfs_int_inotify_event_list *events; > - char buf[PATH_MAX]; > + char *buf = NULL; Make it CLEANUP_FREE, so you don't need to manually free it later (and gets freed in every exit point of the function). -- Pino Toscano
2009 Aug 10
2
daemon/ warnings
...event; - int n, r; + int r; + size_t n; r = read (inotify_fd, inotify_buf + inotify_posn, sizeof (inotify_buf) - inotify_posn); @@ -274,7 +275,7 @@ do_inotify_files (void) { char **ret = NULL; int size = 0, alloc = 0; - int i; + unsigned int i; FILE *fp; guestfs_int_inotify_event_list *events; char buf[PATH_MAX]; -- 1.6.4.174.gc193a
2014 Sep 23
0
[PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check
...-- daemon/inotify.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/daemon/inotify.c b/daemon/inotify.c index 36e5ede..b847b7d 100644 --- a/daemon/inotify.c +++ b/daemon/inotify.c @@ -309,7 +309,7 @@ do_inotify_files (void) unsigned int i; FILE *fp = NULL; guestfs_int_inotify_event_list *events; - char buf[PATH_MAX]; + char *buf = NULL; char tempfile[] = "/tmp/inotifyXXXXXX"; int fd; char cmd[64]; @@ -361,6 +361,12 @@ do_inotify_files (void) return NULL; } + buf = malloc(PATH_MAX); + if (buf == NULL) { + reply_with_perror ("malloc"); +...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
From: "Richard W.M. Jones" <rjones at redhat.com> Callers are supposed to use the availability API to check for functions that may not be available in particular builds of libguestfs. If they don't do this, currently they tend to get obscure error messages, eg: libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory This commit changes the error
2011 Jun 09
15
[PATCH 00/13] Fix errors found using Coverity static analyzer.
I ran the Coverity static analyzer[1] on libguestfs, and fixed many errors as a result. Coverity found some errors in gnulib, but it doesn't seem to be worth following those up since the version of gnulib we are using is so old. There are a couple more errors (possibly 1 false-positive) which I'm going to send in a separate email. BTW all the errors found by Coverity were in the daemon
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...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); - return ret.argv; + return take_stringsbuf (&ret); error: if (fp != NULL) diff --git a/daemon/ldm.c b/daemon/ldm.c index 71cdf46..0636082 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -50,7...
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.
2014 Sep 23
27
[PATCH 00/13] syntax-check
Hi Rich, This series includes patches to make `make syntax-check` pass. Some of the fix require change to maint.mk, but the file is not in git repo. Is it intended? Thanks! Hu Tao (13): syntax-check: dirty hack to pass bindtextdomain check syntax-check: fix error_message_period check syntax-check: fix makefile_at_at_check syntax-check: fix prohibit_assert_without_use check