similar to: [PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.

Displaying 20 results from an estimated 700 matches similar to: "[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions."

2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
After the previous refactoring, we are able to link the daemon to common/utils, and also remove some of the "duplicate" functions that the daemon carried ("duplicate" in quotes because they were often not exact duplicates). Also this removes the duplicate reimplementation of (most) cleanup functions in the daemon, since those are provided by libutils now. It also allows us in
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
Per discussion on IRC, here are two changes to convert all TABs-as-indentation to spaces. The first one is the fully-automated conversion. However, note that the command mentioned uses a file (the .x-sc* one) that is added only in the following patch. The second patch adds rules to help keep things that way: Document and enforce the new spaces-only indentation policy. * cfg.mk
2017 Mar 10
2
[PATCH 1/2] daemon: generate cleanup handlers for structs
This way it is possible to cleanup properly structs in the daemon, when using them within other daemon functions. --- .gitignore | 2 + daemon/Makefile.am | 4 ++ daemon/daemon.h | 1 + generator/daemon.ml | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ generator/daemon.mli | 2 + generator/main.ml | 4 ++ 6 files changed, 114 insertions(+) diff --git
2012 Feb 13
0
[PATCH] daemon: Don't xdr_free uninitialized args struct on error paths.
From: "Richard W.M. Jones" <rjones at redhat.com> For stubs of functions that had arguments, code did this: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t)
2009 Sep 24
1
[PATCH libguestfs] maint: use spaces, not TABs for indentation
>From 1da1502b33d50bc0614a20bc217876fcb8f05d39 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at vv.meyering.net.meyering.net> Date: Thu, 24 Sep 2009 09:24:55 +0200 Subject: [PATCH libguestfs] maint: use spaces, not TABs for indentation "make syntax-check" was failing. This fixes it. * HACKING: Indent with spaces, not TABs. * configure.ac: Likewise. *
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
This change allows parts of the daemon to be written in the OCaml programming language. I am using the ‘Main Program in C’ method along with ‘-output-obj’ to create an object file from the OCaml code / runtime, as described here: https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html Furthermore, change the generator to allow individual APIs to be implemented in OCaml. This is picked by
2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code. It's all refactoring, there is no functional change. Rich.
1999 May 14
0
Problems Building Samba 2.0.3 --with-afs
Hi all, I'm going nuts. Ken Weiss and Steve Holstead have been very nice to me and supplied me with info on how to set my configure files and such. It helped me a lot but I still get stuck a bit later in the process. Namely during pass_check.c. I'm on a AIX 4.1.5 box. Using the export version of AFS 3.4. Help is appreciated. I wouldn't ask you all this if I hadn't already spent
2009 Aug 12
1
factorization would be nice
Hi Rich, I've changed part of generator.ml to look like this: (match snd style with | [] -> () | args -> pr " memset (&args, 0, sizeof args);\n"; pr "\n"; pr " if (!xdr_guestfs_%s_args (xdr_in, &args)) {\n" name; pr " reply_with_error (\"%%s: daemon failed to decode
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2018 May 03
1
[PATCH] daemon: fix memory allocation and leaks in OCaml stubs
Use the cleanup handlers to free the structs (and list of structs) in case their OCaml->C transformation fails for any reason; use calloc() to not try to use uninitialized memory. In case of lists, avoid allocating the memory for the array if there are no elements, since the returned pointer in that case is either NULL, or a free()-only pointer; also, set the list size only after the array is
2004 Apr 08
0
Error building Samba 3.0.2a
While building Samba 3 for SuSE linux 9.0 I have a problem with the AFS component (it builds fine if I omit the --with-afs and --with-fake-kaserver options). During configure I did get a warning: checking whether to use AFS clear-text auth... yes checking whether to use AFS fake-kaserver... yes checking for /usr/include/afs... yes checking afs.h usability... no checking afs.h presence... no
2010 Jun 01
0
Compiling Samba 3.0.37 --with-afs (Steve Linehan)
> I do not know how to proceed. I tried to comment out the line in the spec file to no avail. this is bad idea ;) > Any suggestions? OpenAFS is not supplied directly by CentOS/RHEL. You would have had to get it from a 3rd party repo such as ATrpms/DAG or install from http://openafs.org/release/1.4.12/index-rhel5.html # cd /tmp/ # wget http://samba.org/samba/ftp/stable/samba-3.4.8.tar.gz
2016 Jan 22
1
Re: [PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
On Thursday 21 January 2016 15:48:12 Richard W.M. Jones wrote: > Allows more sharing between the daemon and the inspection program. > --- > daemon/Makefile.am | 2 + > daemon/cleanups.c | 80 ++++++++++ > daemon/cleanups.h | 47 ++++++ > daemon/command.c | 436 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > daemon/command.h | 41 +++++ > daemon/daemon.h
2015 Feb 12
0
[PATCH 3/3] lib: Add third, zero parameter to xdrproc_t
As advised by Daniel P. Berrange, 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
2019 Aug 13
0
[PATCH libnbd 2/6] generator: Create only one Python wrapper per closure.
We were previously generating one instance of the Python closure wrapper per (function * Closure arg). However these wrappers didn't actually differ across functions. We can therefore save a lot of code by only generating one wrapper per closure globally. This reduces the amount of generated code by nearly 25%. Before and after: $ wc -l python/methods.c 3275 python/methods.c $ wc -l
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
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___send (guestfs_h *g, int proc_nr, *
2016 Jan 21
0
[PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
Allows more sharing between the daemon and the inspection program. --- daemon/Makefile.am | 2 + daemon/cleanups.c | 80 ++++++++++ daemon/cleanups.h | 47 ++++++ daemon/command.c | 436 +++++++++++++++++++++++++++++++++++++++++++++++++++++ daemon/command.h | 41 +++++ daemon/daemon.h | 47 +----- daemon/guestfsd.c | 392 ----------------------------------------------- po/POTFILES
2019 Jun 25
3
[PATCH libnbd] generator: Add Mutable type to the generator.
Mutable (Int n) => int *n This can currently only be used for callback arguments of type int (not for other types, nor for any ordinary function arguments), but it could be implemented more generally in future. --- generator/generator | 75 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/generator/generator b/generator/generator