search for: xdr_destroy

Displaying 20 results from an estimated 73 matches for "xdr_destroy".

2009 Aug 12
1
[PATCH libguestfs] fish: don't read freed memory
....2.5 (in /lib64/libc-2.10.1.so) ==11953== by 0x415E10: rc_remote (rc.c:268) ==11953== by 0x413C53: issue_command (fish.c:779) ==11953== by 0x414F81: main (fish.c:721) ==11953== ... (and many more) ... The fix is to ensure that we close the file handle *after*, not before calling xdr_destroy. >From 99c1ef6b484866ec1e7bbd621096ea1a2294f31e Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Wed, 12 Aug 2009 14:44:14 +0200 Subject: [PATCH libguestfs] fish: don't read freed memory * fish/rc.c (rc_remote): Close file handle only *after* xdr_destroy, be...
2017 Oct 09
2
[PATCH] daemon: proto: Remove pervasive but useless debugging messages.
If you spend your time looking at libguestfs debugging output you'll see many messages from the daemon main loop like this: guestfsd: main_loop: new request, len 0x54 guestfsd: main_loop: proc 278 (mkfs) took 0.02 seconds I don't think these messages really bring much value. This commit removes them entirely. An alternative might be to change them to make them shorter and/or less
2016 Aug 25
0
[PATCH v2 2/6] daemon: refactor tsk code
...return -1; + } - return ret; + xdrmem_create (&xdr, buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE); + + ret = xdr_guestfs_int_tsk_dirent (&xdr, &dirent); + if (ret == 0) { + perror ("xdr_guestfs_int_tsk_dirent"); + return -1; + } + + len = xdr_getpos (&xdr); + + xdr_destroy (&xdr); + + /* Send serialised tsk_dirent out. */ + return send_file_write (buf, len); } /* Inspect fsfile to identify its type. */ @@ -221,39 +253,6 @@ file_metadata (TSK_FS_META *fsmeta, guestfs_int_tsk_dirent *dirent) } } -/* Serialise dirent into XDR stream and send it to the ap...
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 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested what the variables are in the the file and the attributes of the variables (like if it is a data.frame, matrix, what are the colnames/rownames, etc.) I'm wondering if there is any facility in R to help me avoid loading the whole file.
1999 May 14
0
Problems Building Samba 2.0.3 --with-afs
...'t ask you all this if I hadn't already spent 3 days trying to figure it out myself. Regards, /Peter Str?mberg Compiling passdb/pass_check.c In file included from /usr/afsws/include/afs/kautils.h:35, from passdb/pass_check.c:141: /usr/afsws/include/rx/xdr.h:219: warning: `XDR_DESTROY' redefined /usr/include/rpc/xdr.h:203: warning: this is the location of the previous definition /usr/afsws/include/rx/xdr.h:222: warning: `xdr_destroy' redefined /usr/include/rpc/xdr.h:204: warning: this is the location of the previous definition /usr/afsws/include/rx/xdr.h:258: warning: `I...
2016 Mar 29
3
[PATCH 0/2] added filesystem_walk API
The filesystem_walk API parses the FS internals of a partition and returns a list of all the files and directories contained within. It list deleted files and directories as well. For each node, it reports its relative path, its inode and its allocation status. This is the end user API for inspecting a disk partition content. The command can handle filenames with special characters. Example
2016 Mar 29
0
[PATCH 1/2] added filesystem_walk API
...len) { + nodes->len = 2 * (nodes->len + 1); + nodes->val = safe_realloc(g, nodes->val, + nodes->len * sizeof (struct guestfs_tsk_node)); + } + + if (deserialise_inode_info(g, &xdr, &nodes->val[index]) < 0) + { + xdr_destroy(&xdr); + free_nodes(nodes); + + return NULL; + } + } + + xdr_destroy(&xdr); + + nodes->len = index; + nodes->val = safe_realloc(g, nodes->val, + nodes->len * sizeof (struct guestfs_tsk_node)); + + return nodes; +} + +/* Parse a...
2015 Feb 09
11
[PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
..._) if (xdrp && ret && !xdrp (&xdr, ret)) { +#else + /* Mac OS X's implementation of xdrproc_t requires a third parameter */ + if (xdrp && ret && !xdrp (&xdr, ret, 0)) { +#endif error (g, "%s: failed to parse reply", fn); xdr_destroy (&xdr); return -1; -- 1.9.3
2004 Apr 08
0
Error building Samba 3.0.2a
...dr_ops' /usr/include/afs/rx/xdr.h:208: error: conflicting types for `XDR' /usr/include/rpc/xdr.h:111: error: previous declaration of `XDR' In file included from /usr/include/afs/afs/kautils.h:35, from auth/pass_check.c:39: /usr/include/afs/rx/xdr.h:266:1: warning: "XDR_DESTROY" redefined In file included from /usr/include/rpc/rpc.h:45, from include/includes.h:371, from auth/pass_check.c:24: /usr/include/rpc/xdr.h:212:1: warning: this is the location of the previous definition In file included from /usr/include/afs/afs/kautils.h:35,...
2016 Nov 22
2
Re: [PATCH v2 4/6] New API: internal_yara_scan
...buf, GUESTFS_MAX_CHUNK_SIZE, XDR_ENCODE); > + > + ret = xdr_guestfs_int_yara_detection (&xdr, &detection); > + if (ret == 0) { > + perror ("xdr_guestfs_int_yara_detection"); > + return -1; > + } > + > + len = xdr_getpos (&xdr); > + > + xdr_destroy (&xdr); > + > + /* Send serialised tsk_detection out. */ Typo in comment. > + return send_file_write (buf, len); > +} > + > /* Clean up yara handle on daemon exit. */ > void yara_finalize (void) __attribute__((destructor)); > void > diff --git a/generator/actio...
2009 Aug 20
1
[PATCH libguestfs] daemon: diagnose socket write failure
...aemon/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_chunk: write failed\n"); - return 0; + return err; }...
2015 Feb 09
0
Re: [PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
...t && !xdrp (&xdr, ret)) { > +#else > + /* Mac OS X's implementation of xdrproc_t requires a third parameter */ > + if (xdrp && ret && !xdrp (&xdr, ret, 0)) { > +#endif > error (g, "%s: failed to parse reply", fn); > xdr_destroy (&xdr); > return -1; This should rather be a configure check, instead of hardcoding how a libc behaves. Also, what does the third parameter represent? -- Pino Toscano
2015 Feb 12
0
[PATCH 3/3] lib: Add third, zero parameter to xdrproc_t
...681,7 +681,7 @@ guestfs___recv (guestfs_h *g, const char *fn, return -1; } } else { - if (xdrp && ret && !xdrp (&xdr, ret)) { + if (xdrp && ret && !xdrp (&xdr, ret, 0)) { error (g, "%s: failed to parse reply", fn); xdr_destroy (&xdr); return -1; -- 1.9.3
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
2017 Oct 12
1
[PATCH v2] daemon: proto: Make the guestfsd main loop messages consistent and useful.
...ecs --- daemon/proto.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/daemon/proto.c b/daemon/proto.c index 14f7efe94..9abc46962 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -96,11 +96,6 @@ main_loop (int _sock) xdr_u_int (&xdr, &len); xdr_destroy (&xdr); - if (verbose) - fprintf (stderr, - "guestfsd: main_loop: new request, len 0x%" PRIx32 "\n", - len); - /* Cancellation sent from the library and received after the * previous request has finished processing. Just ignore it. *...
2016 Aug 26
6
[PATCH v3 0/6] New API: find_inode
v3: - coding style fixes - comment entry_is_dot logic Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 157 ++++++++++++++++++++++++++++++------------- generator/actions.ml | 21 ++++++
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 Aug 26
6
[PATCH v4 0/6] New API: find_inode
v4: - refactor entry_is_dot My apologies for the duplicated submission but I did not read the next e-mail. The tsk_fs_dir_walk API will list all the entries including '.' and '..' in a similar manner as for 'ls -a'. This means our callback will be called for the following entries: . <-- the Root entry etc/. etc/.. <-- again the Root entry etc/systemd/.
2016 Sep 16
7
[PATCH v6 0/6] New API - find_inode
This series should be ready for merge v6: - rebase on master - changes according to last comments Matteo Cafasso (6): filesystem_walk: fixed root inode listing daemon: refactor tsk code lib: rename tsk internal function New API: internal_find_inode New API: find_inode find_inode: added API tests daemon/tsk.c | 155 ++++++++++++++++++++++++++++++-------------