search for: store_field

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

2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...some consumers this does + * matter (eg. simplestreams which incorrectly uses a dict when it + * really should use an array). + */ json_object_foreach (val, key, jvalue) { - v = caml_alloc_tuple (2); + tv = caml_alloc_tuple (2); sv = caml_copy_string (key); - Store_field (v, 0, sv); + Store_field (tv, 0, sv); sv = convert_json_t (jvalue, level + 1); - Store_field (v, 1, sv); - Store_field (lv, i, v); - ++i; + Store_field (tv, 1, sv); + consv = caml_alloc (2, 0); + Store_field (consv, 1, v); + Store_field (consv, 0, tv)...
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...+ CAMLreturn (rv); + } + + ids = malloc (sizeof (*ids) * i); + if (ids == NULL) + caml_raise_out_of_memory (); + + NONBLOCKING (r = $c_name (conn, ids, i)); + CHECK_ERROR_CLEANUP (r == -1, free (ids), \"$c_name\"); + + rv = caml_alloc (r, 0); + for (i = 0; i < r; ++i) + Store_field (rv, i, Val_int (ids[i])); + free (ids); + + CAMLreturn (rv); +" + } elsif ($sig =~ /^(\w+), int : string array$/) { + "\ + CAMLlocal2 (rv, strv); + " . gen_unpack_args ($1) . " + int i = Int_val (iv); + char **names; + int r; + + /* Some libvirt List* functions still...
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2: - Added back the null value. - Reran the tests. Rich.
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
2016 Dec 14
4
[PATCH 0/4] sysprep: Remove various backup files.
https://bugzilla.redhat.com/show_bug.cgi?id=1401320 This series contains two new operations. The second -- and least controversial -- is "passwd-backups" which removes files such as /etc/passwd-, /etc/shadow- and so on. The first one ("backup-files") searches the whole guest filesystem for any regular file which looks like an editor backup file, such as "*~" and
2011 Aug 31
1
[hivex] OCaml binding error?
...2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/generator/generator.ml b/generator/generator.ml index de103ed..c98e625 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -1946,7 +1946,7 @@ copy_type_len (size_t len, hive_type t) v = Val_hive_type (t); Store_field (rv, 0, v); v = Val_int (len); - Store_field (rv, 1, len); + Store_field (rv, 1, v); CAMLreturn (rv); } -- 1.7.4.4
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...rser-c.c @@ -83,11 +83,13 @@ virt_builder_parse_index (value filenamev) for (j = 0, fields = sections->fields; fields != NULL; j++, fields = fields->next) { - v = caml_alloc_tuple (2); + v = caml_alloc_tuple (3); sv = caml_copy_string (fields->key); - Store_field (v, 0, sv); /* (key, value) */ - sv = caml_copy_string (fields->value); + Store_field (v, 0, sv); /* (key, subkey, value) */ + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); Store_field (v, 1, sv); + sv = caml_copy_string (fields->...
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2016 Dec 14
5
[PATCH v3 0/5] sysprep: Remove various backup files.
v3: - Split out test for "unix-like" guest OSes into separate commit. - Add guestfish --format=qcow2 to the test (x2). Rich.
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2016 Dec 14
6
[PATCH v2 0/4] sysprep: Remove various backup files.
In v2: - The backup-files operation now operates on a conservative whitelist of filesystems, so it won't touch anything in /usr. Consequently it also runs much more quickly, about 4 seconds on the barebones virt-builder fedora-25 image. - Call Gc.compact () in visit_tests. - Added documentation to fnmatch.mli.
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
On Tuesday 21 January 2014 16:37:20 Richard W.M. Jones wrote: > On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > > + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); > > > > Store_field (v, 1, sv); > > Heh, sure would be nice if this was an option type :-) > > I believe the following should work: > > (1) Change CAMLlocal4 (..) at the top of the function to: > > CAMLlocal5 (rv, v, sv, sv2, fv); > > (2) Then the new code is: > > if (fiel...
2020 Jan 28
4
[v2v PATCH v2 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of files for Windows from libosinfo, if possible. The actual data is still from virtio-win, just unpacked. Changes from v1: - adapt to use the priority in libosinfo 1.7.0+ - filter out non-pre-installable drivers - collect all the drivers matching the requirements, not just the first, sorting them by priority like libosinfo does
2020 Jan 22
4
[v2v PATCH 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of files for Windows from libosinfo, if possible. The actual data is still from virtio-win, just unpacked. Pino Toscano (3): build: require libosinfo v2v: add a minimal libosinfo interface v2v: try to get windows driver files from libosinfo m4/guestfs-v2v.m4 | 3 + v2v/Makefile.am | 9 +-
2017 Oct 03
0
[PATCH v2 1/2] daemon: Reimplement statvfs API in OCaml.
...= fsu.fsu_bavail; + f_files = fsu.fsu_files; + f_free = fsu.fsu_ffree; + f_favail = -1; + f_fsid = -1; + f_flag = -1; + f_namemax = -1; + +# endif /* !WIN32 */ +#endif /* !HAVE_STATVFS */ + + /* Construct the return struct. */ + rv = caml_alloc (11, 0); + v = caml_copy_int64 (f_bsize); + Store_field (rv, 0, v); + v = caml_copy_int64 (f_frsize); + Store_field (rv, 1, v); + v = caml_copy_int64 (f_blocks); + Store_field (rv, 2, v); + v = caml_copy_int64 (f_bfree); + Store_field (rv, 3, v); + v = caml_copy_int64 (f_bavail); + Store_field (rv, 4, v); + v = caml_copy_int64 (f_files); + Sto...
2015 Aug 12
0
[PATCH 2/2] builder: support Simple Streams v1.0 as index metadata
...+ + if (YAJL_IS_OBJECT (val)) { + size_t len = YAJL_GET_OBJECT(val)->len; + size_t i; + rv = caml_alloc (1, 3); + lv = caml_alloc_tuple (len); + for (i = 0; i < len; ++i) { + v = caml_alloc_tuple (2); + sv = caml_copy_string (YAJL_GET_OBJECT(val)->keys[i]); + Store_field (v, 0, sv); + sv = convert_yajl_value (YAJL_GET_OBJECT(val)->values[i], level + 1); + Store_field (v, 1, sv); + Store_field (lv, i, v); + } + Store_field (rv, 0, lv); + } else if (YAJL_IS_ARRAY (val)) { + size_t len = YAJL_GET_ARRAY(val)->len; + size_t i; + rv =...
2014 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...tions; @@ -83,11 +83,18 @@ virt_builder_parse_index (value filenamev) for (j = 0, fields = sections->fields; fields != NULL; j++, fields = fields->next) { - v = caml_alloc_tuple (2); + v = caml_alloc_tuple (3); sv = caml_copy_string (fields->key); - Store_field (v, 0, sv); /* (key, value) */ - sv = caml_copy_string (fields->value); + Store_field (v, 0, sv); /* (key, Some subkey, value) */ + if (fields->subkey) { + sv2 = caml_copy_string (fields->subkey); + sv = caml_alloc (1, 0); + Store_field (sv, 0, sv2);...