search for: guestfs_

Displaying 20 results from an estimated 104 matches for "guestfs_".

Did you mean: guestfs
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
...nts, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments. http://libguestfs.org/guestfs.3.html#guestfs_lvresize The reason this wouldn't be possible is because in C the call is specified as: int guestfs_lvresize (guestfs_h *g, const char *device, int mbytes); which leaves no scope for extra parameters to be added. However in other languages, it wouldn't be a problem, eg. in Perl you can...
2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
...'s call it __t_ layer. I'm not very good at making up names, so this is temporary:) ). Then making sure that all generated public stuff call __t_ layer and all other internal stuff doesn't use public API since it would deadlock otherwise. Now the problem - an example: Generator creates guestfs_copy_device_to_device_argv, but not guestfs_copy_device_to_device_argv version. Other issue: generated declaration for guestfs__internal_test in guestfs-internal-actions.h looks like this: extern int guestfs__internal_test (guestfs_h *g, const char *str, const char *optstr, char *const *strlist,...
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
$ virt-sparsify input output [ 0.0] Create overlay file in /tmp to protect source disk [ 0.0] Examine source disk ^C guestfs_close: g->lock: Device or resource busy Aborted (core dumped) The reason for this is because virt-sparsify calls exit(2) in the SIGINT signal handler, which causes the close_handles atexit handler to run, which calls guestfs_close. However the same handle is in the middle of a guestfs_* call, a...
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning. I have pushed patches 1-3 upstream. Rich.
2012 Jan 17
2
[PATCH 1/2] c: NFC Remove redundant parentheses
--- generator/generator_c.ml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 4324ec0..9cfb2b7 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -1187,7 +1187,7 @@ trace_send_line (guestfs_h *g) let n = name_of_optargt argt in let uc_shortname = String.uppercase shortname in let uc_n = String.uppercase n in - pr " if ((optargs->bitmask & GUESTFS_%s_%s_BITMASK))\n" + pr " if (optargs->bitmask &...
2012 Oct 30
7
[PATCH v2 0/7] Add symbol versioning (now working).
This rather more complex patch series adds symbol versioning (7/7 shows it in action). This works for me, tested by running old and new virt-inspector binaries against the new library. Rich.
2012 Jan 17
3
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres' on these, meaning I have ensured that a bunch of basic manual tests work as expected. I'm in the process of adding more comprehensive tests. Here's an example simple javascript program which uses these bindings: === const Guestfs = imports.gi.Guestfs; print('Starting'); var g = new
2014 May 27
2
[PATCH] ruby: add :nodoc: comment for internal methods
This way they are ignored by rdoc. --- generator/ruby.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/generator/ruby.ml b/generator/ruby.ml index 1111993..88762ca 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -522,6 +522,15 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) * +guestfs_%s+[http://libguestfs.org/guestfs.3.html#guestfs_%s]). */ " f.name args ret f.shortdesc doc f.name f.name + ) else ( + pr "\ +/* + * call-seq: + * g.%s + * + * :nodoc: + */ +" f.name ); (* Generate the function. Pro...
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...a/generator/ruby.ml b/generator/ruby.ml index cd6678d..87bb34a 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -178,7 +178,7 @@ parse_flags (int argc, VALUE *argv) * Guestfs::Guestfs.new([{:environment => false, :close_on_exit => false}]) -> Guestfs::Guestfs * * Call - * +guestfs_create_flags+[http://libguestfs.org/guestfs.3.html#guestfs_create_flags] + * {guestfs_create_flags}[http://libguestfs.org/guestfs.3.html#guestfs_create_flags] * to create a new libguestfs handle. The handle is represented in * Ruby as an instance of the Guestfs::Guestfs class. */ @@ -235,7 +2...
2015 Jun 11
1
Re: [PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
Hi, On Saturday 06 June 2015 14:20:38 Richard W.M. Jones wrote: > Since each ACQUIRE_LOCK/RELEASE_LOCK call must balance, this code is > difficult to debug. Enable DEBUG_LOCK to add some prints which can > help. There's some way this could be simplified: > const char * > guestfs_last_error (guestfs_h *g) > { > - return g->last_error; > + const char *r; > + > + ACQUIRE_LOCK (g); > + r = unlocked_last_error (g); > + RELEASE_LOCK (g); > + return r; > +} (picking this because it is the first ACQUIRE_LOCK ... RELEASE_LOCK pattern in the patc...
2016 Feb 12
0
[PATCH] php: restructure and expand tests
Rename the existing tests according to the naming/numbering described in guestfs-hacking(1), and improve the current ones: - guestfs_php_001.phpt: rename to guestfs_020_create.phpt - guestfs_php_003.phpt: rename to guestfs_070_optargs.phpt - guestfs_php_bindtests.phpt: rename to guestfs_090_bindtests.phpt - guestfs_091_version.phpt: new, checks taken from the former guestfs_php_002.phpt - guestfs_100_launch.phpt: new, modelled...
2016 Feb 24
0
[PATCH 3/3] src: print contents of structs and struct lists on tracing
...--- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/generator/c.ml b/generator/c.ml index 9af4529..7446412 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1348,6 +1348,7 @@ and generate_client_actions hash () = #include \"guestfs-internal-actions.h\" #include \"guestfs_protocol.h\" #include \"errnostring.h\" +#include \"structs-print.h\" "; @@ -1623,7 +1624,7 @@ and generate_client_actions hash () = let needs_i = match ret with - | RStringList _ | RHashtable _ -> true + | RStringList _ | RHashtable _ |...
2017 Apr 25
0
[PATCH] daemon: Use CLEANUP_* functions to avoid an explicit free in stub functions.
...g _ | RConstOptString _ -> failwithf "RConstString|RConstOptString cannot be used by daemon functions" - | RString _ -> pr " char *r;\n" - | RStringList _ | RHashtable _ -> pr " char **r;\n" - | RStruct (_, typ) -> pr " guestfs_int_%s *r;\n" typ - | RStructList (_, typ) -> pr " guestfs_int_%s_list *r;\n" typ + | RString _ -> pr " CLEANUP_FREE char *r = NULL;\n" + | RStringList _ | RHashtable _ -> pr " CLEANUP_FREE_STRING_LIST char **r = NULL;\n" + | RSt...
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
...g"; String "mountpoint"], [OString "options"]), 286, [CamelName "Mount9P"], [], "mount 9p filesystem", "\ @@ -6213,7 +6213,7 @@ Device mapper devices which correspond to logical volumes are I<not> returned in this list. Call C<guestfs_lvs> if you want to list logical volumes."); - ("ntfsresize_opts", (RErr, [Device "device"], [OInt64 "size"; OBool "force"]), 288, [Optional "ntfsprogs"], + ("ntfsresize_opts", (RErr, [Device "device"], [OInt64 "...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...de \"structs-print.h\" + +"; + + let write_structs = + List.iter ( + fun { s_name = typ; s_cols = cols } -> + let needs_i = + List.exists (function (_, (FUUID|FBuffer)) -> true | _ -> false) cols in + + pr "void\n"; + pr "guestfs_int_print_%s_indent (struct guestfs_%s *%s, FILE *dest, const char *linesep, const char *indent)\n" + typ typ typ; + pr "{\n"; + if needs_i then ( + pr " size_t i;\n"; + pr "\n" + ); + List.iter ( + f...
2012 Jan 18
4
[PATCH 1/4] ocaml: Add -Wno-missing-field-initializers to avoid a warning.
From: "Richard W.M. Jones" <rjones at redhat.com> --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index fa97479..6e42423 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,10 @@ if test "$gl_gcc_warnings" = yes; then # Work around warning in src/inspect.c. This seems to be a bug in gcc
2012 Oct 22
3
[PATCH 0/2 NOT WORKING] Symbol versioning
John, This was my attempt to add symbol versioning to the library, letting us break ABI without breaking any existing callers. Unfortunately it doesn't work: - the new versioned symbols are marked local in libguestfs.so - the existing symbols should now have @GUESTFS_0.0 versions, but don't The documentation for this stuff is extremely thin, and I've got a bad case of influenza at the moment. Rich.
2012 Mar 28
1
[PATCH] Split gobject sources into 1 file per class
This patch replaces patches 14 and 15 from my previous series. The gtk-doc output is now reasonable, and we can rely on an automatically generated guestfs-sections.txt. Matt
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
....gitignore index 633b39d..da59e44 100644 --- a/.gitignore +++ b/.gitignore @@ -255,8 +255,11 @@ Makefile.in /fuse/test-guestunmount-fd /generator/.depend /generator/bytes.ml +/generator/common_utils.ml +/generator/common_utils.mli /generator/files-generated.txt /generator/generator +/generator/guestfs_config.ml /generator/.pod2text.data* /generator/stamp-generator /get-kernel/.depend diff --git a/dib/utils.ml b/dib/utils.ml index 3df5171..4026ee8 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -74,7 +74,7 @@ let digit_prefix_compare a b = let split_prefix str = let len = String.length...
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...ed and documented in all language bindings, and in guestfish. VStateTest: A public API which queries the library state machine. It is exported and documented in all language bindings, but not guestfish. VBindTest: An internal API used only for testing language bindings. It is guarded by GUESTFS_PRIVATE in the C api, but exported by all other language bindings as it is required for testing. If language bindings offer any way to guard use of these apis, that mechanism should be used. It is not documented anywhere. VDebug: A debugging API. It is exported by all language bindings, and...