Displaying 3 results from an estimated 3 matches for "libosinfo_db_os_path".
2016 Jul 25
2
[PATCH] osinfo: revamp db reading (RHBZ#1359652)
...* error, since we should fall back silently if these are not
* available. Although we'll emit some debug if this happens.
+ *
+ * Try to use the shared osinfo database layout (and location) first:
+ * https://gitlab.com/libosinfo/libosinfo/blob/master/docs/database-layout.txt
*/
-#define LIBOSINFO_DB_OS_PATH LIBOSINFO_DB_PATH "/oses"
-
static int read_osinfo_db_xml (guestfs_h *g, const char *filename);
+static int read_osinfo_db_flat (guestfs_h *g, const char *directory);
+static int read_osinfo_db_three_levels (guestfs_h *g, const char *directory);
+static int read_osinfo_db_directory (gu...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...b/src/osinfo.c
index b1cfa09..4a4cbfc 100644
--- a/src/osinfo.c
+++ b/src/osinfo.c
@@ -229,9 +229,7 @@ static int read_os_node (guestfs_h *g, xmlXPathContextPtr xpathCtx, xmlNodePtr o
static int
read_osinfo_db_xml (guestfs_h *g, const char *filename)
{
- const size_t pathname_len =
- strlen (LIBOSINFO_DB_OS_PATH) + strlen (filename) + 2;
- char pathname[pathname_len];
+ CLEANUP_FREE char *pathname = NULL;
CLEANUP_XMLFREEDOC xmlDocPtr doc = NULL;
CLEANUP_XMLXPATHFREECONTEXT xmlXPathContextPtr xpathCtx = NULL;
CLEANUP_XMLXPATHFREEOBJECT xmlXPathObjectPtr xpathObj = NULL;
@@ -240,7 +238,7 @@ read_o...