search for: guestfs_chunk

Displaying 17 results from an estimated 17 matches for "guestfs_chunk".

2009 Aug 20
1
[PATCH libguestfs] daemon: diagnose socket write failure
...oto.c (send_chunk): Don't ignore socket-write error. --- daemon/proto.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon/proto.c b/daemon/proto.c index 9b33902..c2dd50c 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -495,8 +495,10 @@ send_chunk (const guestfs_chunk *chunk) xdr_uint32_t (&xdr, &len); xdr_destroy (&xdr); - (void) xwrite (sock, lenbuf, 4); - (void) xwrite (sock, buf, len); + int err = (xwrite (sock, lenbuf, 4) == 0 + && xwrite (sock, buf, len) == 0 ? 0 : -1); + if (err) + fprintf (stderr, "send_...
2013 Dec 10
2
[PATCH 0/2] proto: Remove a couple of errors which hide earlier errors.
The handle can only store one error, so if an error path has more than one call to error/perrorf, then the earlier error will be lost and overwritten by the later one. Fix two (more) cases of this. Rich.
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch: https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html This adds OCaml and Perl bindings (both tested), support for progress bars in virt-resize, and adds progress notifications to a number of the simpler commands. Still to do is to add progress messages to more commands. There are still a few commands which would be
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.
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2012 Jul 24
11
[PATCH 01/12] configure: Add -nographic command line option to qemu.
Without this option, configure will fail when there is no display. Signed-off-by: Masami HIRATA <msmhrt at gmail.com> --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index de8a064..61d6f69 100644 --- a/configure.ac +++ b/configure.ac @@ -593,16 +593,16 @@ working. AC_MSG_FAILURE([$QEMU version must be >=
2016 Mar 07
2
[PATCH v2] Use less stack.
...SIZE, fp)) > 0) { if (send_file_write (buf, r) < 0) { pclose (fp); return -1; diff --git a/daemon/proto.c b/daemon/proto.c index 3d45dd5..61d376e 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -596,12 +596,19 @@ send_file_end (int cancel) static int send_chunk (const guestfs_chunk *chunk) { - char buf[GUESTFS_MAX_CHUNK_SIZE + 48]; + const size_t buf_len = GUESTFS_MAX_CHUNK_SIZE + 48; + CLEANUP_FREE char *buf = NULL; char lenbuf[4]; XDR xdr; uint32_t len; - xdrmem_create (&xdr, buf, sizeof buf, XDR_ENCODE); + buf = malloc (buf_len); + if (buf == NULL) {...
2015 Oct 29
16
[PATCH 00/16] Refactoring of configure.ac and guestfs.pod
Two (not related to each other) refactorings: Patches 1-12 split configure.ac into smaller files using the m4_include mechanism. Patches 13-15 split out parts of guestfs.pod (ie. guestfs(3)) into three new manual pages: guestfs-hacking(3) - how to extend and contribute to libguestfs guestfs-internals(3) - architecture and internals guestfs-security(3) - security and CVEs Patch 16 is a
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...oc (len); @@ -333,7 +333,7 @@ receive_file (receive_cb cb, void *opaque) } if (xread (sock, buf, len) == -1) - exit (1); + exit (EXIT_FAILURE); xdrmem_create (&xdr, buf, len, XDR_DECODE); memset (&chunk, 0, sizeof chunk); @@ -503,7 +503,7 @@ send_chunk (const guestfs_chunk *chunk) && xwrite (sock, buf, len) == 0 ? 0 : -1); if (err) { fprintf (stderr, "send_chunk: write failed\n"); - exit (1); + exit (EXIT_FAILURE); } return err; diff --git a/examples/hello.c b/examples/hello.c index 8b36ed4..b4d5d8c 100644 --- a/ex...
2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has evolved over a long time without any particular direction, and the result is, to say the least, not very organized. These patches take a first step at cleaning up the mess by abstracting out socket operations from the rest of the code. The purpose of this is to allow us to slot in a different connection layer under the
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...s too long (%u bytes)\n", - len); - exit (EXIT_FAILURE); - } + if (len > GUESTFS_MESSAGE_MAX) + error (EXIT_FAILURE, 0, "incoming message is too long (%u bytes)", len); buf = malloc (len); if (!buf) { @@ -617,10 +595,8 @@ send_chunk (const guestfs_chunk *chunk) int err = (xwrite (sock, lenbuf, 4) == 0 && xwrite (sock, buf, len) == 0 ? 0 : -1); - if (err) { - fprintf (stderr, "guestfsd: send_chunk: write failed\n"); - exit (EXIT_FAILURE); - } + if (err) + error (EXIT_FAILURE, 0, "send_chunk: wri...
2013 Aug 24
46
[PATCH 00/46] Proposed patches for libguestfs 1.20.11.
Tested with 'make check-release'. tests/parallel (in check-slow) failed, although it does regularly and that seems to be because of libvirt. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...if (err < 0) { if (err == -2) /* daemon sent cancellation */ - send_file_cancellation_sync (g); + send_file_cancellation_sync (g); return err; } } @@ -2193,7 +2193,7 @@ send_file_chunk_sync (guestfs_h *g, int cancel, const char *buf, size_t buflen) if (!xdr_guestfs_chunk (&xdr, &chunk)) { error (g, _("xdr_guestfs_chunk failed (buf = %p, buflen = %zu)"), - buf, buflen); + buf, buflen); xdr_destroy (&xdr); goto cleanup1; } @@ -2269,7 +2269,7 @@ check_for_daemon_cancellation (guestfs_h *g) if (flag != GUESTFS_CA...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.