similar to: [PATCH 1/2] daemon: generate cleanup handlers for structs

Displaying 20 results from an estimated 200 matches similar to: "[PATCH 1/2] daemon: generate cleanup handlers for structs"

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
2012 Jul 24
3
[PATCH V4 1/3] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/mount.c | 25 +++++++++++++++++++++++-- generator/generator_actions.ml | 23 ++++++++++++----------- gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git
2012 Jul 23
1
[PATCH V3 1/2] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/mount.c | 25 +++++++++++++++++++++++-- generator/generator_actions.ml | 23 ++++++++++++----------- gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git
2012 Jul 23
3
[PATCH V2 1/4] mount: add a macro to resolve path or device
Add a macro STRDUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/daemon.h | 16 ++++++++++++++++ daemon/mount.c | 13 ++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 85eec45..f7d0c75 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -336,6
2012 Jul 21
5
[PATCH 1/5] mount: add a macro to resolve path or device
Add a macro DUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/daemon.h | 18 ++++++++++++++++++ daemon/mount.c | 13 ++----------- po/POTFILES | 8 ++++++++ 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 85eec45..39cc3f3 100644 --- a/daemon/daemon.h +++
2015 Oct 24
3
[PATCH] Added xfs support for vfs_min_size.
--- daemon/daemon.h | 1 + daemon/fs-min-size.c | 7 +++++++ daemon/xfs.c | 12 ++++++++++++ generator/actions.ml | 6 +++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 4a969dd..1f0cd30 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -269,6 +269,7 @@ extern int copy_xattrs (const char *src, const char *dest);
2015 Oct 27
1
[PATCHv2] Added xfs support to vfs_minimum_size.
--- daemon/daemon.h | 1 + daemon/fs-min-size.c | 7 +++++++ daemon/xfs.c | 16 ++++++++++++++++ generator/actions.ml | 6 +++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 4a969dd..1f0cd30 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -269,6 +269,7 @@ extern int copy_xattrs (const char *src, const char *dest);
2012 Jul 16
2
[PATCH V4] NEW API: add new api xfs_info
Add xfs_info to show the geometry of the xfs filesystem. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- Hi Rich, I got an odd error, can you help me with this error or give me a debug method? Thanks, Wanlong Gao daemon/Makefile.am | 1 + daemon/xfs.c | 278 +++++++++++++++++++++++++++++++ generator/generator_actions.ml
2017 Mar 10
0
[PATCH 2/2] daemon: fix memory leak in xfs implementation of vfs_minimum_size
Use the proper cleanup handler for deleting the guestfs_int_xfsinfo struct (so the string fields are deleted too). Fixes commit f5caa421d1bb826559ec7a6d98c1a6b6b1f0a629. --- daemon/xfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/xfs.c b/daemon/xfs.c index 7f72e6a..a0d08b2 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -664,7 +664,7 @@ do_xfs_repair (const char
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions, in mllib/common_utils.ml and generator/utils.ml. This changes things so that the same set of utility functions can be shared with both directories. It's not possible to use common_utils.ml directly in the generator because it provides several functions that use modules outside the OCaml stdlib. Therefore we add some
2017 Apr 25
0
[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.
--- generator/daemon.ml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index b00627063..9d5ba00b2 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -155,13 +155,13 @@ let generate_daemon_stubs actions () = | RBool _ -> pr " int r;\n" | RConstString _ | RConstOptString _
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
2012 Jul 31
1
[PATCH] xfs: add new api xfs-growfs
New api xfs_growfs for expanding a XFS filesystem. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/xfs.c | 119 +++++++++++++++++++++++++++++++++++++++++ generator/generator_actions.ml | 15 ++++++ gobject/Makefile.inc | 6 ++- po/POTFILES | 1 + src/MAX_PROC_NR | 2 +- 5 files changed, 140
2017 Jun 19
0
Re: [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
On Mon, Jun 19, 2017 at 05:38:53PM +0200, Pino Toscano wrote: > On Monday, 19 June 2017 15:31:26 CEST Richard W.M. Jones wrote: > > These won't be used by the daemon, so interferes with us using > > common/utils in the daemon, so they are moved to a different library. > > --- > > I checked it again, and the daemon does use structs cleanups: > > $ cat
2017 Jun 19
2
Re: [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
On Monday, 19 June 2017 15:31:26 CEST Richard W.M. Jones wrote: > These won't be used by the daemon, so interferes with us using > common/utils in the daemon, so they are moved to a different library. > --- I checked it again, and the daemon does use structs cleanups: $ cat generator/main.ml [...] output_to "daemon/structs-cleanups.c"
2017 Jul 14
0
[PATCH 23/27] daemon: Reimplement ‘md_detail’ API in OCaml.
--- daemon/md.c | 66 ----------------------------------------------- daemon/md.ml | 37 ++++++++++++++++++++++++++ daemon/md.mli | 1 + generator/actions_core.ml | 1 + generator/daemon.ml | 27 +++++++++++++++++++ 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/daemon/md.c b/daemon/md.c index 5c9ecd136..549dd89fa 100644 ---
2012 Jul 09
1
[PATCH] NEW API: add new api xfs_info
Add xfs_info to show the geometry of the xfs filesystem. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- Hi Rich, This patch add xfs_info, and start the xfs support work. I'd like to add the xfs support, like xfs_growfs, xfs_io, xfs_db, xfs_repair etc. Any thoughts? Thanks, Wanlong Gao daemon/Makefile.am | 1 + daemon/xfs.c | 69
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
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
From: Sergei Golovan <sgolovan@gmail.com> Replace the use of liberl_interface, which is removed in Erlang 23, by libei. The implementation uses the ei_decode_iodata() function which has been introduces only for Erlang 23, so it doesnt work with earlier Erlang versions. --- erlang/Makefile.am | 1 - erlang/main.c | 312 +++++++++++++++++++++++++-------------------
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
I see the following warnings: cmds.c:934:13: warning: 'print_int_bool_list' defined but not used cmds.c:1093:13: warning: 'print_stat_list' defined but not used cmds.c:1124:13: warning: 'print_statvfs_list' defined but not used cmds.c:1171:13: warning: 'print_version_list' defined but not used This patch makes it so we don't emit the unused