search for: unitv

Displaying 20 results from an estimated 71 matches for "unitv".

Did you mean: unity
2019 Apr 01
2
[PATCH] OCaml tools: fix 3999 -> 3339 typo
...c.c b/common/mltools/tools_utils-c.c index b015dcace..3b80091c0 100644 --- a/common/mltools/tools_utils-c.c +++ b/common/mltools/tools_utils-c.c @@ -39,7 +39,7 @@ extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv); extern value guestfs_int_mllib_set_echo_keys (value unitv); extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); -extern value guestfs_int_mllib_rfc3999_date_time_string (value unitv); +extern value guestfs_int_mllib_rfc3339_date_time_string (value unitv); /* Interface with the guestfish inspection and decryption code. */ int echo_keys =...
2015 Aug 24
3
[PATCH 1/3] ocaml: dynamically generate the content of Guestfs.Errno
...il.h> +#include <caml/memory.h> +#include <caml/mlvalues.h> + +#include \"guestfs.h\" + +#include \"guestfs-c.h\" + +/* These prototypes are solely to quiet gcc warnings. */ +"; + List.iter ( + fun e -> + pr "value ocaml_guestfs_get_%s (value unitv);\n" e + ) ocaml_errnos; + + List.iter ( + fun e -> + pr "\ + +/* NB: \"noalloc\" function. */ +value +ocaml_guestfs_get_%s (value unitv) +{ + return Val_int (%s); +} +" e e + ) ocaml_errnos + and generate_ocaml_structure_decls () = List.iter ( fun {...
2015 Jun 18
3
[PATCH v2 0/3] daemon: parted: Always use -s option even with -m.
version 2: - Turn the "unrecognised disk label" error into errno == EINVAL - Fix virt-alignment-scan - Rework the fix for virt-v2v bug 1232192 (see description of patch 3/3)
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
....h> #include <error.h> +#include <time.h> +#include <string.h> #include <caml/alloc.h> #include <caml/fail.h> @@ -41,6 +43,7 @@ extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv extern value guestfs_int_mllib_set_echo_keys (value unitv); extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); extern value guestfs_int_mllib_open_out_channel_from_fd (value fdv); +extern value guestfs_int_mllib_rfc3999_date_time_string (value unitv); /* Interface with the guestfish inspection and decryption code. */ int echo_keys = 0...
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...ol>’ option."), poolname, err->message); - virConnectClose (conn); caml_invalid_argument (errmsg); } CAMLreturnT (virStoragePoolPtr, pool); } + value -v2v_dumpxml (value passwordv, value connv, value domnamev) +v2v_libvirt_connect_ro (value connv, value unitv) { - CAMLparam3 (passwordv, connv, domnamev); - CAMLlocal1 (retv); + CAMLparam2 (connv, unitv); + const char *conn_uri = NULL; + char errmsg[ERROR_MESSAGE_LEN]; + virConnectPtr conn; + + if (connv != Val_int (0)) + conn_uri = String_val (Field (connv, 0)); /* Some conn */ + + /* We have...
2020 Oct 03
0
[PATCH nbdkit v2 3/3] ocaml: Add bindings for nbdkit_peer_{pid, uid, gid}.
...l_nbdkit_peer_gid" diff --git a/plugins/ocaml/bindings.c b/plugins/ocaml/bindings.c index 6c92cd3e..d231ec89 100644 --- a/plugins/ocaml/bindings.c +++ b/plugins/ocaml/bindings.c @@ -190,3 +190,27 @@ ocaml_nbdkit_debug (value strv) return Val_unit; } + +value +ocaml_nbdkit_peer_pid (value unitv) +{ + int id = nbdkit_peer_pid (); + if (id == -1) caml_failwith ("nbdkit_peer_pid"); + return Val_int (id); +} + +value +ocaml_nbdkit_peer_uid (value unitv) +{ + int id = nbdkit_peer_uid (); + if (id == -1) caml_failwith ("nbdkit_peer_uid"); + return Val_int (id); +} + +v...
2011 Jun 29
2
parse XML file
...e/conf/timeseriesExchangeType.xsd"> <stationname value="Aachen"> <v date="2011-04-01" qualityLevel="high" latitude="50.7839" longitude="6.0947" altitude="202" unitA="m" geoQualityLevel="certain" unitV="degree C">14.1</v> <v date="2011-04-02">17.6</v> <v date="2011-04-03">11.5</v> <v date="2011-04-04">10.0</v> <v date="2011-04-05" qualityLevel="low">9.6</v> <...
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
...define Nothing ((value) 0) +extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; +#endif + +#include <guestfs.h> + +#include "options.h" + +extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv); +extern value guestfs_int_mllib_set_echo_keys (value unitv); +extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); + +/* Interface with the guestfish inspection and decryption code. */ +int echo_keys = 0; +int keys_from_stdin = 0; + +value +guestfs_int_mllib_inspect_decrypt (value gv, value gpv) +{ + CAMLparam2 (gv, gpv); + guestfs_h *g = (g...
2019 Mar 22
0
[PATCH 3/4] common/mltools: allow fd for machine readable output
...s.h> #include <caml/unixsupport.h> +/* Evil ... */ +#define CAML_INTERNALS +#include <caml/io.h> #include <guestfs.h> @@ -37,6 +40,7 @@ extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv); extern value guestfs_int_mllib_set_echo_keys (value unitv); extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); +extern value guestfs_int_mllib_open_out_channel_from_fd (value fdv); /* Interface with the guestfish inspection and decryption code. */ int echo_keys = 0; @@ -103,3 +107,16 @@ guestfs_int_mllib_set_keys_from_stdin (value unit...
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
...gt; #include <error.h> +#include <time.h> +#include <string.h> #include <caml/alloc.h> #include <caml/fail.h> @@ -37,6 +39,7 @@ extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv); extern value guestfs_int_mllib_set_echo_keys (value unitv); extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); +extern value guestfs_int_mllib_rfc3999_date_time_string (value unitv); /* Interface with the guestfish inspection and decryption code. */ int echo_keys = 0; @@ -103,3 +106,51 @@ guestfs_int_mllib_set_keys_from_stdin (value un...
2019 Apr 08
0
[PATCH v4 1/7] v2v: require libvirt
...e <libvirt/virterror.h> -#endif #include "guestfs.h" #include "guestfs-utils.h" #pragma GCC diagnostic ignored "-Wmissing-prototypes" -#ifdef HAVE_LIBVIRT - #define ERROR_MESSAGE_LEN 512 static void @@ -519,21 +515,3 @@ v2v_libvirt_get_version (value unitv) CAMLreturn (rv); } - -#else /* !HAVE_LIBVIRT */ - -#define NO_LIBVIRT(proto) \ - proto __attribute__((noreturn)); \ - proto \ - {...
2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...c.c @@ -36,7 +36,7 @@ #include "options.h" -extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv); +extern value guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv, value allowdiscards); extern value guestfs_int_mllib_set_echo_keys (value unitv); extern value guestfs_int_mllib_set_keys_from_stdin (value unitv); extern value guestfs_int_mllib_rfc3339_date_time_string (value unitv); @@ -46,9 +46,9 @@ int echo_keys = 0; int keys_from_stdin = 0; value -guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv) +guestfs_int_mll...
2016 Aug 24
1
[PATCH] v2v: Allow libvirt >= 2.1.0 to be used for Xen and vCenter conversions.
...v2v_domain_exists (value connv, value domnamev) CAMLreturn (Val_bool (domain_exists)); } +/* XXX This function is stuffed here for convenience (accessing + * libvirt), not because it belongs logically with the rest of the + * functions in this file. + */ +value +v2v_libvirt_get_version (value unitv) +{ + CAMLparam1 (unitv); + CAMLlocal1 (rv); + int major, minor, release; + /* We have to assemble the error on the stack because a dynamic + * string couldn't be freed. + */ + char errmsg[ERROR_MESSAGE_LEN]; + unsigned long ver; + virErrorPtr err; + + if (virGetVersion (&ver, N...
2015 May 05
2
[PATCH 0/2] v2v: -o libvirt: Check if the domain exists on the target (RHBZ#889082).
https://bugzilla.redhat.com/show_bug.cgi?id=889082
2020 Sep 18
0
[PATCH common] mlutils: Simple wrapper around sysconf (_SC_NPROCESSORS_ONLN).
..._mllib_mkdtemp (value val_pattern); extern value guestfs_int_mllib_realpath (value pathv); extern value guestfs_int_mllib_statvfs_statvfs (value pathv); extern value guestfs_int_mllib_statvfs_is_network_filesystem (value pathv); +extern value guestfs_int_mllib_sysconf_nr_processors_online (value unitv); /* NB: This is a "noalloc" call. */ value @@ -368,3 +369,17 @@ guestfs_int_mllib_statvfs_is_network_filesystem (value pathv) return Val_bool (0); #endif } + +/* NB: This is a "noalloc" call. */ +value +guestfs_int_mllib_sysconf_nr_processors_online (value unitv) +{ +#...
2016 Feb 04
0
[PATCH] aarch64: Use a common table of AAVMF paths.
...it/aarch64/vars-template-pflash.raw", + + NULL +}; diff --git a/v2v/utils-c.c b/v2v/utils-c.c index 66291b2..4ec4063 100644 --- a/v2v/utils-c.c +++ b/v2v/utils-c.c @@ -57,3 +57,30 @@ v2v_utils_drive_index (value strv) CAMLreturn (Val_int (r)); } + +value +v2v_utils_aavmf_firmware (value unitv) +{ + CAMLparam1 (unitv); + CAMLlocal5 (rv, v, v1, v2, cons); + /* Initialize the list backwards. */ + size_t i = guestfs_int_count_strings ((char **) guestfs_int_aavmf_firmware); + + rv = Val_int (0); + + while (i > 0) { + v1 = caml_copy_string (guestfs_int_aavmf_firmware[i-2]); + v...
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Changes from v1: - use Obj.magic to convert int -> Unix.file_descr - add tests Pino Toscano (4):
2017 Aug 23
0
[PATCH v2 supermin 1/1] Switch binary embedding to a C source
...c +++ b/src/format-ext2-init-c.c @@ -27,19 +27,18 @@ #include <caml/memory.h> /* The init binary. - * See: bin2s.pl, init.c. + * See: bin2c.pl, init.c. */ -extern uint8_t _binary_init_start, _binary_init_end; +#include <format-ext2-init-bin.h> value supermin_binary_init (value unitv) { CAMLparam1 (unitv); CAMLlocal1 (sv); - size_t n = &_binary_init_end - &_binary_init_start; - sv = caml_alloc_string (n); - memcpy (String_val (sv), &_binary_init_start, n); + sv = caml_alloc_string (_binary_init_len); + memcpy (String_val (sv), _binary_init, _binary_ini...
2020 Oct 05
4
[PATCH nbdkit v3 0/4] ip: Add filtering by process ID, user ID and group ID.
v2 was here: https://www.redhat.com/archives/libguestfs/2020-October/msg00019.html v3: * defence -> defense * Use int64_t instead of int. This compiles on Windows. * Add GC wrappers to OCaml bindings. * New FreeBSD patch. * Removed "pid:" example from the ip filter manual, and added a warning beside the pid documentation. Rich.