search for: guestfs_priv

Displaying 20 results from an estimated 25 matches for "guestfs_priv".

Did you mean: guestfs_proc
2016 Mar 22
1
[PATCH] Reduce GUESTFS_PRIVATE usage
Remove the GUESTFS_PRIVATE=1 define for some tools and tests which don't really use any private API. --- align/Makefile.am | 1 - df/Makefile.am | 1 - tests/protocol/Makefile.am | 1 - tests/qemu/Makefile.am | 2 -- tests/regressions/Makefile.am | 6 ++---- 5 files changed, 2 ins...
2017 Feb 14
2
Re: [PATCH v3 04/10] lib/osinfo.c: Extract xml processing into a callback
...t; --- a/lib/osinfo.c > +++ b/lib/osinfo.c > @@ -43,6 +43,7 @@ > * > * XXX Currently the database is not freed when the program exits / > * library is unloaded, although we should probably do that. > + * > */ An extra line has been added to this comment. > +#ifndef GUESTFS_PRIVATE > +void guestfs_int_debug (guestfs_h *g, const char *fs, ...) > +{ > + va_list args; > + > + va_start (args, fs); > + vfprintf (stderr, fs, args); > + va_end (args); > +} > + > +void > +guestfs_int_perrorf (guestfs_h *g, const char *fs, ...) > +{ > + v...
2016 Nov 08
4
[PATCH 1/3] generator: c: move internal functions
...format must be - * identical to what rpcgen / the RFC defines. - *) - (* Public structures. *) - let generate_all_structs = List.iter ( + generate_all_structs external_structs; + + pr "\ +/* Actions. */ +"; + + generate_all_headers public_functions_sorted; + + pr "\ +#if GUESTFS_PRIVATE +/* Symbols protected by GUESTFS_PRIVATE are NOT part of the public, + * stable API, and can change at any time! We export them because + * they are used by some of the language bindings. + */ + +/* Private functions. */ + +"; + + generate_all_headers private_functions_sorted; + + pr &qu...
2017 Feb 14
0
Re: [PATCH v3 04/10] lib/osinfo.c: Extract xml processing into a callback
...gt; @@ -43,6 +43,7 @@ > >   * > >   * XXX Currently the database is not freed when the program exits / > >   * library is unloaded, although we should probably do that. > > + * > >   */ > > An extra line has been added to this comment. Ooops > > +#ifndef GUESTFS_PRIVATE > > +void guestfs_int_debug (guestfs_h *g, const char *fs, ...) > > +{ > > +  va_list args; > > + > > +  va_start (args, fs); > > +  vfprintf (stderr, fs, args); > > +  va_end (args); > > +} > > + > > +void > > +guestfs_int_perror...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...name typ name; + pr " else\n"; + pr " fprintf (dest, \"%%s%s: %%s\", indent, linesep);\n" name + ) cols; + pr "}\n"; + pr "\n"; + ) in + + write_structs external_structs; + + pr "\ +#if GUESTFS_PRIVATE + +"; + + write_structs internal_structs; + + pr "\ +#endif /* End of GUESTFS_PRIVATE. */ +" + +(* Generate structs-print.h file. *) +and generate_client_structs_print_h () = + generate_header CStyle LGPLv2plus; + + pr "\ +#ifndef GUESTFS_INTERNAL_STRUCTS_PRINT_H_ +#defin...
2013 Jan 30
1
[PATCH] Make internal-only functions and structures private
Certain functions are intended to be internal only, but we currently export them anyway. This change moves them into a separate section of guestfs.h protected by a GUESTFS_PRIVATE variable. This change also enables private structs, but doesn't implement any. This change only affects the C api. Language bindings aren't affected, but probably should be in the future. --- align/Makefile.am | 2 +- df/Makefile.am | 2 +- erlang/Makefil...
2017 Feb 10
0
[PATCH v3 04/10] lib/osinfo.c: Extract xml processing into a callback
...ic int +read_osinfo_db (guestfs_h *g, + read_osinfo_db_callback callback, void *opaque); +static int read_osinfo_db_xml (guestfs_h *g, const char *pathname, void *data); static void free_osinfo_db_entry (struct osinfo *); -#define XMLSTREQ(a,b) (xmlStrEqual((a),(b)) == 1) +#ifndef GUESTFS_PRIVATE +void guestfs_int_debug (guestfs_h *g, const char *fs, ...) +{ + va_list args; + + va_start (args, fs); + vfprintf (stderr, fs, args); + va_end (args); +} + +void +guestfs_int_perrorf (guestfs_h *g, const char *fs, ...) +{ + va_list args; + CLEANUP_FREE char *msg = NULL; + int err; + + v...
2017 Mar 07
0
[PATCH v4 3/9] mllib: ocaml wrapper for lib/osinfo
...deletions(-) create mode 100644 mllib/osinfo-c.c create mode 100644 mllib/osinfo.ml create mode 100644 mllib/osinfo.mli diff --git a/lib/osinfo.c b/lib/osinfo.c index 11b50d903..126a645c0 100644 --- a/lib/osinfo.c +++ b/lib/osinfo.c @@ -52,6 +52,19 @@ #include "osinfo.h" +#ifndef GUESTFS_PRIVATE +#undef perrorf +#define perrorf(g,...) \ +{ \ + CLEANUP_FREE char *msg = NULL; \ + ignore_value (asprintf (&msg, __VA_ARGS__)); \ + perror (msg); \ +} + +#undef debug +#...
2017 Mar 23
0
[PATCH v5 03/10] mllib: ocaml wrapper for lib/osinfo
...deletions(-) create mode 100644 mllib/osinfo-c.c create mode 100644 mllib/osinfo.ml create mode 100644 mllib/osinfo.mli diff --git a/lib/osinfo.c b/lib/osinfo.c index 5ccb554be..083872669 100644 --- a/lib/osinfo.c +++ b/lib/osinfo.c @@ -52,6 +52,21 @@ #include "osinfo.h" +#ifndef GUESTFS_PRIVATE +#undef perrorf +#define perrorf(g,...) \ +{ \ + CLEANUP_FREE char *msg = NULL; \ + ignore_value (asprintf (&msg, __VA_ARGS__)); \ + perror (msg); \ + /* Ignoring the re...
2017 Apr 12
0
[PATCH v6 03/10] mllib: ocaml wrapper for lib/osinfo
...deletions(-) create mode 100644 mllib/osinfo-c.c create mode 100644 mllib/osinfo.ml create mode 100644 mllib/osinfo.mli diff --git a/lib/osinfo.c b/lib/osinfo.c index 5ccb554be..9a411b28d 100644 --- a/lib/osinfo.c +++ b/lib/osinfo.c @@ -52,6 +52,45 @@ #include "osinfo.h" +#ifndef GUESTFS_PRIVATE +#undef perrorf +static void perrorf(guestfs_h *g, const char *fmt, ...) +__attribute__((format (printf,2,3))); + +static void perrorf(guestfs_h *g, const char *fmt, ...) +{ + va_list args; + CLEANUP_FREE char *msg = NULL; + CLEANUP_FREE char *fs = NULL; + + ignore_value (asprintf (&fs,...
2016 Nov 08
0
[PATCH 2/3] Split internal stuff out of guestfs.h
...colon = true) @@ -607,13 +616,6 @@ extern GUESTFS_DLL_PUBLIC void *guestfs_next_private (guestfs_h *g, const char * generate_all_headers private_functions_sorted; - pr "\ -/* Private structures. */ - -"; - - generate_all_structs internal_structs; - pr "\ #endif /* End of GUESTFS_PRIVATE. */ @@ -650,6 +652,34 @@ pr "\ #endif /* GUESTFS_H_ */ " +(* Generate the guestfs-private.h file. *) +and generate_guestfs_private_h () = + generate_header CStyle LGPLv2plus; + + pr "\ +#ifndef GUESTFS_PRIVATE_H_ +#define GUESTFS_PRIVATE_H_ + +#include \"guestfs.h\&quot...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...id *opaque); - -static int -read_osinfo_db (guestfs_h *g, - read_osinfo_db_callback callback, void *opaque); -static int read_osinfo_db_xml (guestfs_h *g, const char *pathname, void *data); -static void free_osinfo_db_entry (struct osinfo *); +#include "osinfo.h" #ifndef GUESTFS_PRIVATE void guestfs_int_debug (guestfs_h *g, const char *fs, ...) @@ -109,82 +79,6 @@ guestfs_int_perrorf (guestfs_h *g, const char *fs, ...) } #endif /* GUESTFS_PRIVATE */ -/* Given one or more fields from the header of a CD/DVD/ISO, look up - * the media in the libosinfo database and return our...
2017 Feb 10
15
[PATCH v3 00/10] Introducing virt-builder-repository
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo
2017 Feb 07
0
[PATCH v2 3/7] mllib: expose libosinfo DB reading functions in mllib
...' has been called, caller must not ignore it) - * 0 => could not locate the OS - * 1 => matching OS found, the osinfo_ret pointer has been filled in - */ -int -guestfs_int_osinfo_map (guestfs_h *g, const struct guestfs_isoinfo *isoinfo, - const struct osinfo **osinfo_ret) +#ifndef GUESTFS_PRIVATE +void guestfs_int_debug (guestfs_h *g, const char *fs, ...) { - size_t i; - - /* We only need to lock the database when reading it for the first time. */ - gl_lock_lock (osinfo_db_lock); - if (osinfo_db_size == 0) { - if (read_osinfo_db (g) == -1) { - gl_lock_unlock (osinfo_db_lock)...
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 in...
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all, Here is the v5 of my patches series applying the latest comments from Pino. Cédric Bosdonnat (10): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to
2017 Mar 07
15
[PATCH v4 0/9] Introducing virt-builder-repository
Hi all, Here is a v4 of my series. It includes the changes according to Pino and Richard's comments. However, the perrorf/debug problem is addressed differently: instead of adding an implementation for the internal function names when building for mllib, I redefine these macros. Obviously this is not perfect, but at least easier to understand. Pino's comment about the Notes regex
2017 Jun 19
11
[PATCH v7 0/9] Introducing virt-builder-repository
Hi all, Here is an update of the series fixing Pino's latest comment. It just doesn't implement the change based on never-accepted run commands patch. Cédric Bosdonnat (9): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index