search for: xdrp

Displaying 20 results from an estimated 33 matches for "xdrp".

Did you mean: xdp
2013 Oct 17
4
Notes on getting libguestfs to work on Mac OS X
...h. libguestfs on Mac OS X, recipe so far: -------------------------------------- - libtool-kill-dependency_libs.sh: replace chmod --reference="$output.tmp" "$output" -> chmod `stat -f "%p" "$output.tmp"` "$output" - src/proto.c: replace if (!(*xdrp) (&xdr, args)) -> if (!(*xdrp) (&xdr, args, 0)) - src/proto.c: replace if (xdrp && ret && !xdrp (&xdr, ret)) -> if (xdrp && ret && !xdrp (&xdr, ret, 0)) - src/launch-direct.c: comment out - if (qemu_supports (g, data, "-nodefaults"))...
2015 Feb 09
11
[PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
>From Apple's xdr.h: "If your code invokes an xdrproc_t callback, it must be modified to pass a third parameter, which may simply be zero." --- src/proto.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/proto.c b/src/proto.c index 92ae84d..57f4882 100644 --- a/src/proto.c +++ b/src/proto.c @@ -252,7 +252,12 @@ guestfs___s...
2013 Oct 17
2
Re: Notes on getting libguestfs to work on Mac OS X
...ad from: http://libguestfs.org/download/binaries/appliance/ patches: -------- - libtool-kill-dependency_libs.sh: replace - chmod --reference="$output.tmp" "$output" -> chmod `stat -f "%p" "$output.tmp"` "$output" - src/proto.c: replace - if (!(*xdrp) (&xdr, args)) -> if (!(*xdrp) (&xdr, args, 0)) - src/proto.c: replace - if (xdrp && ret && !xdrp (&xdr, ret)) -> if (xdrp && ret && !xdrp (&xdr, ret, 0)) - src/launch-direct.c: comment out - if (qemu_supports (g, data, "-nodefaults"))...
2015 Feb 09
0
Re: [PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
On Monday 09 February 2015 11:06:15 Margaret Lewicka wrote: > >From Apple's xdr.h: > "If your code invokes an xdrproc_t callback, it must be modified to pass > a third parameter, which may simply be zero." > --- > src/proto.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/proto.c b/src/proto.c > index 92ae84d..57f4882 100644 > --- a/src/proto.c > +++ b...
2015 Feb 12
0
[PATCH 3/3] lib: Add third, zero parameter to xdrproc_t
...the third parameter can be passed on all platforms rather than specifically Mac. Quoting a libvirt commit rationale after Daniel: commit 9fa3a8ab6fd82ad2f5a14b490696085061418718 Author: Doug Goldstein <cardoe@cardoe.com> Date: Wed Oct 30 11:22:58 2013 -0500 MacOS: Handle changes to xdrproc_t definition With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t)(XDR *, ...); but instead as: typedef bool_t (*xdrproc_t)(XDR *, void *, unsigned int); For reference, Linux systems typically define it as: typedef bool_t (*xdrproc_t)(XDR *, v...
2015 Feb 12
8
[PATCH 1/3] macosx: Includes/defines for byteswap operations
--- src/inspect-apps.c | 13 ++++++++++++- src/inspect-fs-windows.c | 6 ++++++ src/journal.c | 5 +++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/inspect-apps.c b/src/inspect-apps.c index 20cf00a..8fbae9c 100644 --- a/src/inspect-apps.c +++ b/src/inspect-apps.c @@ -35,11 +35,22 @@ #include <sys/endian.h> #endif -/* be32toh is usually a macro
2013 Oct 17
0
Re: Notes on getting libguestfs to work on Mac OS X
On Thu, Oct 17, 2013 at 11:49:04AM +0100, Richard W.M. Jones wrote: > - src/proto.c: replace if (!(*xdrp) (&xdr, args)) -> if (!(*xdrp) (&xdr, args, 0)) > - src/proto.c: replace if (xdrp && ret && !xdrp (&xdr, ret)) -> if (xdrp && ret && !xdrp (&xdr, ret, 0)) On this point, don't use the {src,daemon}/guestfs_protocol.[ch] files that may be...
2015 Feb 06
0
Re: Patchable build problems on OS X 10.10
...libguestfs/commit/7ddf6bcbfdc66855b594afaaacdc4998177f2286 > diff --git src/proto.c src/proto.c > index 8001c8c..53d1d6b 100644 > --- src/proto.c > +++ src/proto.c > @@ -252,7 +252,7 @@ guestfs___send (guestfs_h *g, int proc_nr, > * have no parameters. > */ > if (xdrp) { > - if (!(*xdrp) (&xdr, args)) { > + if (!(*xdrp) (&xdr, args, 0)) { > error (g, _("dispatch failed to marshal args")); > return -1; > } > @@ -681,7 +681,7 @@ guestfs___recv (guestfs_h *g, const char *fn, > return -1; >...
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
...ize_rtn at entry= > 0x7fffffffd854, buf_rtn=buf_rtn at entry=0x7fffffffd858) at proto.c:623 > #12 0x00007ffff6e17a5a in guestfs_int_recv > ? ? (g=g at entry=0xf31290, fn=fn at entry=0x7ffff6e3b3e8 "download", hdr=hdr at entry= > 0x7fffffffd920, err=err at entry=0x7fffffffd8f0, xdrp=xdrp at entry=0x0, ret= > ret at entry=0x0) > ? ? at proto.c:668 > > I debugged this issue and noticed that the appliance logs from?commandrvf?are > truncated, leading to parse failure (missing utf-8 additional bytes): > https://github.com/libguestfs/libguestfs/blob/master/python...
2015 Feb 05
4
Patchable build problems on OS X 10.10
...sues have been mentioned in https://www.redhat.com/archives/libguestfs/2013-October/msg00042.html, and I've reused RWMJ's patches. * fuse/guestunmount.c uses Linux-specific fusermount and '-v' option for fuser. * src/proto.c -- From Apple's xdr.h: "If your code invokes an xdrproc_t callback, it must be modified to pass a third parameter, which may simply be zero." * OS X does not provide open_memstream(). * src/guestfs-internal-frontend.h and gnulib/lib/error.c need monkey-patching to replace program_name with getprogname(). The patch I'm using right now to g...
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...y=0xf31290, size_rtn=size_rtn at entry=0x7fffffffd854, buf_rtn=buf_rtn at entry=0x7fffffffd858) at proto.c:623 #12 0x00007ffff6e17a5a in guestfs_int_recv (g=g at entry=0xf31290, fn=fn at entry=0x7ffff6e3b3e8 "download", hdr=hdr at entry=0x7fffffffd920, err=err at entry=0x7fffffffd8f0, xdrp=xdrp at entry=0x0, ret=ret at entry=0x0) at proto.c:668 I debugged this issue and noticed that the appliance logs from commandrvf are truncated, leading to parse failure (missing utf-8 additional bytes): https://github.com/libguestfs/libguestfs/blob/master/python/handle.c#L134 UnicodeDecodeErr...
2023 Feb 14
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...ize_rtn at entry= > 0x7fffa95cc544, buf_rtn=buf_rtn at entry=0x7fffa95cc548) at proto.c:623 > #10 0x00007f6dd168603a in guestfs_int_recv > ? ? (g=g at entry=0xae06f0, fn=fn at entry=0x7f6dd16aa308 "download", hdr=hdr at entry= > 0x7fffa95cc610, err=err at entry=0x7fffa95cc5e0, xdrp=xdrp at entry=0x0, ret= > ret at entry=0x0) > ? ? at proto.c:668 > #11 0x00007f6dd163825e in guestfs_download (g=g at entry=0xae06f0, remotefilename= > <optimized out>, filename=0x7f6dd17edea0 "/tmp/1") at actions-5.c:2984 > #12 0x00007f6dd17ab01a in guestfs_int_py_do...
2009 Aug 10
2
daemon/ warnings
...on.h (__attribute__, ATTRIBUTE_UNUSED): Define. --- daemon/daemon.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 70a2351..a6bbb73 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -213,4 +213,14 @@ extern void reply (xdrproc_t xdrp, char *ret); } \ while (0) +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(x) /* empty */ +# endif +#endif + +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif +...
2012 Jan 24
14
[PATCH 00/14] Run the daemon under valgrind and fix resultant errors.
This patch series lets you run the daemon under valgrind. Many errors were found and fixed. With the complete series applied, valgrind doesn't show any errors.
2012 Apr 26
1
[PATCH 1/2] gobject: Use generator_built macro to ensure generated files are rebuilt properly.
From: "Richard W.M. Jones" <rjones at redhat.com> --- generator/generator_gobject.ml | 4 ++-- gobject/Makefile.am | 14 +++++++++----- gobject/Makefile.inc | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml index 17c6c36..3096501 100644 ---
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...write (sock, lenbuf, 4) == -1) { fprintf (stderr, "xwrite failed\n"); - exit (1); + exit (EXIT_FAILURE); } if (xwrite (sock, buf, len) == -1) { fprintf (stderr, "xwrite failed\n"); - exit (1); + exit (EXIT_FAILURE); } } @@ -265,7 +265,7 @@ reply (xdrproc_t xdrp, char *ret) if (!xdr_guestfs_message_header (&xdr, &hdr)) { fprintf (stderr, "guestfsd: failed to encode reply header\n"); - exit (1); + exit (EXIT_FAILURE); } if (xdrp) { @@ -289,11 +289,11 @@ reply (xdrproc_t xdrp, char *ret) if (xwrite (sock,...
2013 Jun 05
3
[PATCH 1/3] inspection: Refactor windows systemroot detection to allow re-use
This change refactors guestfs___has_windows_systemroot to guestfs___get_windows_systemroot. The new function returns a dynamically allocated char * which must be freed. The new function is no less efficient than before, as it returns the result of guestfs___case_sensitive_path_silently, which is required anyway. The new code is slightly more efficient than before, as it re-uses the result of this
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...10 ++++++++++ hivex/hivex.h | 10 ++++++++++ src/guestfs.h | 10 ++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 8912840..3f4c480 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -234,4 +234,14 @@ extern void reply (xdrproc_t xdrp, char *ret); # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif +#define STREQ(a,b) (strcmp((a),(b)) == 0) +#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) +#define STRNEQ(a,b) (strcmp((a),(b)) != 0) +#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0) +#define STREQLEN(a,b...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...quot;guestfsd: xwrite failed\n"); - exit (EXIT_FAILURE); - } + if (xwrite (sock, lenbuf, 4) == -1) + error (EXIT_FAILURE, 0, "xwrite failed"); + if (xwrite (sock, buf, len) == -1) + error (EXIT_FAILURE, 0, "xwrite failed"); } void @@ -352,10 +339,8 @@ reply (xdrproc_t xdrp, char *ret) hdr.proc = proc_nr; hdr.serial = serial; - if (!xdr_guestfs_message_header (&xdr, &hdr)) { - fprintf (stderr, "guestfsd: failed to encode reply header\n"); - exit (EXIT_FAILURE); - } + if (!xdr_guestfs_message_header (&xdr, &hdr)) +...