Displaying 20 results from an estimated 60 matches for "xmlnodeptr".
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...+ continue;
+ }
+
+ debug (g, "osinfo: mapped disk to database entry %zu", i);
+
+ if (osinfo_ret)
+ *osinfo_ret = &osinfo_db[i];
+ return 1;
+ }
+
+ debug (g, "osinfo: no mapping found");
+
+ return 0;
+}
+
+static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
+static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
+static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
+
+/* Read a single XML file from...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...+ continue;
+ }
+
+ debug (g, "osinfo: mapped disk to database entry %zu", i);
+
+ if (osinfo_ret)
+ *osinfo_ret = &osinfo_db[i];
+ return 1;
+ }
+
+ debug (g, "osinfo: no mapping found");
+
+ return 0;
+}
+
+static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
+static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
+static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
+
+/* Read a single XML file from...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...+ continue;
+ }
+
+ debug (g, "osinfo: mapped disk to database entry %zu", i);
+
+ if (osinfo_ret)
+ *osinfo_ret = &osinfo_db[i];
+ return 1;
+ }
+
+ debug (g, "osinfo: no mapping found");
+
+ return 0;
+}
+
+static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
+static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
+static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
+
+/* Read a single XML file from...
2017 Apr 12
0
[PATCH v6 02/10] lib: extract osinfo DB traversing API
...+ continue;
+ }
+
+ debug (g, "osinfo: mapped disk to database entry %zu", i);
+
+ if (osinfo_ret)
+ *osinfo_ret = &osinfo_db[i];
+ return 1;
+ }
+
+ debug (g, "osinfo: no mapping found");
+
+ return 0;
+}
+
+static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
+static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
+static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
+
+/* Read a single XML file from...
2017 Feb 07
0
[PATCH v2 3/7] mllib: expose libosinfo DB reading functions in mllib
...+ continue;
+ }
+
+ debug (g, "osinfo: mapped disk to database entry %zu", i);
+
+ if (osinfo_ret)
+ *osinfo_ret = &osinfo_db[i];
+ return 1;
+ }
+
+ debug (g, "osinfo: no mapping found");
+
+ return 0;
+}
+
+static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
+static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
+static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
+
+/* Read a single XML file from...
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
...odev)
{
CAMLparam2 (xpathctxv, nodev);
xmlXPathContextPtr xpathctx = xpathctxptr_val (xpathctxv);
@@ -268,7 +269,7 @@ v2v_xml_xpathctx_set_nodeptr (value xpathctxv, value nodev)
}
value
-v2v_xml_nodeptr_name (value nodev)
+mllib_xml_nodeptr_name (value nodev)
{
CAMLparam1 (nodev);
xmlNodePtr node = (xmlNodePtr) nodev;
@@ -284,7 +285,7 @@ v2v_xml_nodeptr_name (value nodev)
}
value
-v2v_xml_nodeptr_as_string (value docv, value nodev)
+mllib_xml_nodeptr_as_string (value docv, value nodev)
{
CAMLparam2 (docv, nodev);
CAMLlocal1 (strv);
@@ -316,7 +317,7 @@ v2v_xml_nodeptr_as_stri...
2017 Feb 07
11
[PATCH v2 0/7] Introducing virt-builder-repository
Hi all,
Here is a new version of the virt-builder-repository series taking
care of Pino's comments. It has also been rebased on recent master.
Cédric Bosdonnat (7):
mllib: factorize code to add Checksum.get_checksum function
Move xml and xpath_helpers OCAML code to mllib
mllib: expose libosinfo DB reading functions in mllib
builder: rename docs test script
builder: add
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 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
2017 Apr 12
12
[PATCH v6 00/10] Add a virt-builder-repository tool
Hi all,
Here is an updated version of that patch series.
Diff to v5:
* Apply Pino's comments
* Fix indentation issues
* Add a default value for arch in builder/index_parser.ml if template
is set
* Improved new images filtering: don't process image that didn't
change. This has been uncovered by introduction of --no-compression
Cédric Bosdonnat (10):
lib/osinfo.c:
2015 Aug 25
2
[PATCH 1/2] inspect: recognize the ALT Linux distribution
Check its presence ahead of /etc/redhat-release, as the distro provides
it and thus previously it was recognized as "redhat-based".
---
generator/actions.ml | 4 ++++
src/guestfs-internal.h | 1 +
src/inspect-fs-unix.c | 21 +++++++++++++++++++++
src/inspect-fs.c | 2 ++
src/inspect-icon.c | 1 +
src/inspect.c | 1 +
6 files changed, 30 insertions(+)
diff
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 16
1
[PATCH] inspection: Deprecate APIs and remove support for inspecting installer CDs.
...;
- }
-
- /* Close the directory handle. */
- r = closedir (dir);
- dir = NULL;
- if (r == -1) {
- perrorf (g, "closedir: %s", directory);
- goto error;
- }
-
- return 1;
-
- error:
- if (dir)
- closedir (dir);
-
- return -1;
-}
-
-static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osinfo);
-static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
-static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
-
-/* Read a single XML file from...
2015 Aug 25
0
[PATCH 2/2] osinfo: add altlinux and mageia distributions
---
src/osinfo.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/osinfo.c b/src/osinfo.c
index 0454b45..f7e1548 100644
--- a/src/osinfo.c
+++ b/src/osinfo.c
@@ -492,7 +492,9 @@ parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo)
content = (char *) xmlNodeGetContent (node);
if (content) {
- if (STREQ (content, "centos"))
+ if (STREQ (content, "altlinux"))
+ osinfo->distro = OS_DISTRO_ALTLINUX;
+ else if (STREQ (content, "centos"))
osi...
2016 Jul 26
1
[PATCH] osinfo: map "sled" as "sles"
...o descriptions of "sled" distributions as "sles".
---
src/osinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/osinfo.c b/src/osinfo.c
index 907580e..7fdaf1c 100644
--- a/src/osinfo.c
+++ b/src/osinfo.c
@@ -625,7 +625,7 @@ parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo)
osinfo->distro = OS_DISTRO_OPENSUSE;
else if (STREQ (content, "rhel"))
osinfo->distro = OS_DISTRO_RHEL;
- else if (STREQ (content, "sles"))
+ else if (STREQ (content, "sled") || STREQ (content, "sles"...
2016 May 26
1
[PATCH] osinfo: use guestfs_int_version_from_x_y to parse the os version
...EGEXP (re_major_minor, "(\\d+)\\.(\\d+)", 0)
-
gl_lock_define_initialized (static, osinfo_db_lock);
static ssize_t osinfo_db_size = 0; /* 0 = unread, -1 = error, >= 1 = #records */
static struct osinfo *osinfo_db = NULL;
@@ -436,17 +434,16 @@ static int
parse_version (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo)
{
CLEANUP_FREE char *content = NULL;
- CLEANUP_FREE char *major = NULL, *minor = NULL;
content = (char *) xmlNodeGetContent (node);
if (content) {
- if (match2 (g, content, re_major_minor, &major, &minor)) {
- osinfo->major_version = gues...
2016 Jul 25
1
[PATCH] osinfo: parse also single-digit version numbers
...0e 100644
--- a/src/osinfo.c
+++ b/src/osinfo.c
@@ -62,6 +62,7 @@
#include "ignore-value.h"
#include "glthread/lock.h"
+#include "c-ctype.h"
#include "guestfs.h"
#include "guestfs-internal.h"
@@ -548,9 +549,12 @@ parse_version (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo)
CLEANUP_FREE char *content = NULL;
content = (char *) xmlNodeGetContent (node);
- if (content) {
+ /* We parse either "X.Y" or "X" as version strings, so try to parse
+ * only if the first character is a digit.
+ */
+ if (content &...
2016 Jul 25
2
[PATCH] osinfo: revamp db reading (RHBZ#1359652)
...e the directory handle. */
+ r = closedir (dir);
+ dir = NULL;
+ if (r == -1) {
+ perrorf (g, "closedir: %s", directory);
+ goto error;
+ }
+
+ return 1;
+
+ error:
+ if (dir)
+ closedir (dir);
return -1;
}
@@ -221,13 +336,12 @@ static int read_iso_node (guestfs_h *g, xmlNodePtr iso_node, struct osinfo *osin
static int read_media_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr media_node, struct osinfo *osinfo);
static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr os_node, struct osinfo *osinfo);
-/* Read a single XML file from LIB...
2015 Nov 23
4
Custom C finalizers for .Call
...ollected earlier during the .Call
procedure, but these are rare. A lot of C code in packages might
become safer and cleaner if authors would have an option to let this
be automated.
The most general feature would a hook for adding custom C functions to
the .Call exit, similar to on.exit() in R:
xmlNodePtr *node = xmlNewNode(...);
Rf_on_exit(xmlFreeNode, node);
EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(...);
Rf_on_exit(EVP_PKEY_CTX_free, ctx);
SEXP out = PROTECT(allocVector(...));
Rf_on_exit(UNPROTECT, 1);
I don't know R's internals well enough to estimate if something like
this would...