Displaying 20 results from an estimated 27 matches for "camllocal5".
Did you mean:
camllocal1
2014 Apr 22
3
[PATCH 1/2] builder: add an optional suffix string for INI parsing errors
...(int errcode, char * cmdname, value arg) Noreturn;
extern int do_parse (struct parse_context *context, FILE *in);
value
-virt_builder_parse_index (value progv, value filenamev)
+virt_builder_parse_index (value progv, value error_suffixv, value filenamev)
{
CAMLparam2 (progv, filenamev);
CAMLlocal5 (rv, v, sv, sv2, fv);
@@ -58,6 +58,7 @@ virt_builder_parse_index (value progv, value filenamev)
parse_context_init (&context);
context.program_name = String_val (progv);
context.input_file = String_val (filenamev);
+ context.error_suffix = String_val (error_suffixv);
in = fopen (...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
...lds->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 (fields->subkey) { /* Some subkey */
> sv2 = caml_copy_string (fields->subkey);
> sv = caml_alloc (1, 0);
> Store_field (sv, 0, sv2);
> } else...
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
The index files already allowed the 'key[subkey]=...' syntax for keys,
but considering such string as whole key. Proper split the parsing and
the handling of the subkeys, so they can be searched a bit easier.
This causes no actual behaviour changes, it is just internal
micro-refactoring.
---
builder/index-parser-c.c | 8 +++++---
builder/index-scan.l | 9 ++++++++-
2014 Jan 21
0
Re: [PATCH] builder: proper consider subkeys in index files
...no 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 (fields->subkey) { /* Some subkey */
sv2 = caml_copy_string (fields->subkey);
sv = caml_alloc (1, 0);
Store_field (sv, 0, sv2);
} else /* None */
sv = Val_int (0);...
2016 Feb 04
0
[PATCH] aarch64: Use a common table of AAVMF paths.
...quot;,
+
+ 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]);
+ v2 = caml_copy_string (guestfs_int_aavmf_f...
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
...value arg) Noreturn;
#include "index-struct.h"
#include "index-parse.h"
-extern FILE *yyin;
+extern int do_parse (struct parse_context *context, FILE *in);
value
virt_builder_parse_index (value filenamev)
@@ -52,26 +52,30 @@ virt_builder_parse_index (value filenamev)
CAMLlocal5 (rv, v, sv, sv2, fv);
struct section *sections;
size_t i, nr_sections;
+ struct parse_context context;
+ FILE *in;
- yyin = fopen (String_val (filenamev), "r");
- if (yyin == NULL)
+ parse_context_init (&context);
+
+ in = fopen (String_val (filenamev), "r");
+...
2014 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...etions(-)
diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c
index 17e680b..fbbebff 100644
--- a/builder/index-parser-c.c
+++ b/builder/index-parser-c.c
@@ -49,7 +49,7 @@ value
virt_builder_parse_index (value filenamev)
{
CAMLparam1 (filenamev);
- CAMLlocal4 (rv, v, sv, fv);
+ CAMLlocal5 (rv, v, sv, sv2, fv);
struct section *sections;
size_t i, nr_sections;
@@ -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_...
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a
regression test.
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...#define JSON_FLOAT_TAG 2
+#define JSON_BOOL_TAG 3
+#define JSON_LIST_TAG 4
+#define JSON_DICT_TAG 5
value virt_builder_json_parser_tree_parse (value stringv);
@@ -36,60 +41,87 @@ static value
convert_json_t (json_t *val, int level)
{
CAMLparam0 ();
- CAMLlocal4 (rv, lv, v, sv);
+ CAMLlocal5 (rv, v, tv, sv, consv);
if (level > 20)
caml_invalid_argument ("too many levels of object/array nesting");
if (json_is_object (val)) {
- const size_t len = json_object_size (val);
- size_t i;
const char *key;
json_t *jvalue;
- rv = caml_alloc (1, 3);
-...
2016 Aug 17
1
[PATCH] v2v: Use OVMF secure boot file (RHBZ#1367615).
This is only lightly tested. In particularly I only tested that the
non-secure-boot path still works. I didn't test it on RHEL 7.3 yet
because I haven't got enough free disk space for these giant source
*.ova files :-( Will try to give that a go later.
Rich.
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2:
- Added back the null value.
- Reran the tests.
Rich.
2015 Jul 08
7
[PATCH 0/6] RFC: basic subscription-manager support in virt-customize
Hi,
this series introduces a basic support for
registering/attaching/unregistering RHEL guests using
subscription-manager, so it is possible to do for example:
$ cat <<EOF > sm.conf
[general]
username=user
password=pass
[attach-0]
pool=ID
EOF
$ virt-customize -a rhel-guest.qcow2 \
--sm-config sm.conf --sm-register --sm-attach 0 \
--install pkg1 --install pkg2
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
2016 Aug 18
3
[PATCH v2 0/2] v2v: Use OVMF secure boot file (RHBZ#1367615).
First version was posted here:
https://www.redhat.com/archives/libguestfs/2016-August/thread.html#00100
This is semantically the same as the first version. However
I've split the patch up into two parts. In the first part,
I factor out the UEFI paths so now they are created by the
generator and written in the library and v2v/ directory directly,
instead of the complex business of having a C
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 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...i];
+ itemv = caml_alloc (2, 0);
+ Store_field (itemv, 0, Val_int (type - 1));
+ Store_field (itemv, 1, listv);
+ listv = itemv;
+ }
+ }
+
+ CAMLreturn (listv);
+}
+
+CAMLprim value
+ocaml_libvirt_connect_call_auth_default_callback (value listv)
+{
+ CAMLparam1 (listv);
+ CAMLlocal5 (credv, retv, elemv, optv, v);
+ int i, len, ret;
+ const char *str;
+ virConnectCredentialPtr creds;
+
+ if (virConnectAuthPtrDefault == NULL
+ || virConnectAuthPtrDefault->cb == NULL)
+ CAMLreturn (Val_unit);
+
+ len = _list_length (listv);
+ creds = calloc (len, sizeof (*creds))...
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 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 |
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
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