search for: v_major

Displaying 20 results from an estimated 48 matches for "v_major".

2016 May 18
0
[PATCH 2/2] inspect: switch to version struct for os major/minor version
...str); extern bool guestfs_int_version_ge (const struct version *v, int maj, int min, int mic); +extern bool guestfs_int_version_cmp_ge (const struct version *a, const struct version *b); #define version_init_null(v) guestfs_int_version_from_values (v, 0, 0, 0) +#define version_is_null(v) ((v)->v_major == 0 && (v)->v_minor == 0 && (v)->v_micro == 0) #endif /* GUESTFS_INTERNAL_H_ */ diff --git a/src/inspect-fs-cd.c b/src/inspect-fs-cd.c index b008f58..d8373f6 100644 --- a/src/inspect-fs-cd.c +++ b/src/inspect-fs-cd.c @@ -217,9 +217,9 @@ check_fedora_installer_root (guestfs...
2016 May 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
...ersion.c \ libguestfs.syms libguestfs_la_CPPFLAGS = \ diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index d4e4e3c..098fe20 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -509,6 +509,12 @@ struct guestfs_h size_t nr_features; }; +struct version { + int v_major; + int v_minor; + int v_micro; +}; + /* Per-filesystem data stored for inspect_os. */ enum inspect_os_format { OS_FORMAT_UNKNOWN = 0, @@ -623,6 +629,12 @@ struct guestfs_message_header; struct guestfs_message_error; struct guestfs_progress; +/* version.c */ +extern void guestfs_int_versi...
2016 May 26
1
[PATCH] osinfo: use guestfs_int_version_from_x_y to parse the os version
...e_unsigned_int (g, minor); - if (osinfo->minor_version == -1) - return -1; + struct version version; + int res = guestfs_int_version_from_x_y (g, &version, content); + if (res < 0) + return -1; + else if (res > 0) { + osinfo->major_version = version.v_major; + osinfo->minor_version = version.v_minor; } } -- 2.5.5
2016 May 26
1
[PATCH] lib: qemu: use guestfs_int_version_from_x_y for qemu version parsing
...or_i = guestfs_int_parse_unsigned_int (g, minor_s); - if (minor_i == -1) - goto parse_failed; - - guestfs_int_version_from_values (qemu_version, major_i, minor_i, 0); - - debug (g, "qemu version %d.%d", major_i, minor_i); + debug (g, "qemu version %d.%d", qemu_version->v_major, qemu_version->v_minor); } static void -- 2.5.5
2017 Jun 16
1
[PATCH] inspection: Deprecate APIs and remove support for inspecting installer CDs.
...- free (str); - } - - /* XXX should do major.minor before this */ - r = guestfs_int_first_egrep_of_file (g, "/.treeinfo", - "^version = [[:digit:]]+", 0, &str); - if (r == -1) - return -1; - if (r > 0) { - v = find_value (str); - fs->version.v_major = guestfs_int_parse_unsigned_int_ignore_trailing (g, v); - free (str); - if (fs->version.v_major == -1) - return -1; - } - - r = guestfs_int_first_egrep_of_file (g, "/.treeinfo", - "^arch = [-_[:alnum:]]+$", 0, &str); - if (r == -1) - return -1;...
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which fixes the whole utf8/iconv business. It's probably better to list what isn't fixed: (1) I didn't leave the osinfo code around because I'm still haven't looked too closely at virt-builder-repository. Can't we just fetch this code from the git history when we need it? (2) I didn't change the way
2017 Jul 31
16
[PATCH v11 00/10] Reimplement inspection in the daemon.
v10: https://www.redhat.com/archives/libguestfs/2017-July/msg00245.html No actual change here, but I rebased and retested. Also this series now does not depend on any other patch series since everything else needed is upstream. Rich.
2016 May 24
3
[PATCH 1/3] inspect: recognize the Void Linux distribution
...product_name = safe_strndup (g, value, value_len); @@ -229,10 +231,18 @@ parse_os_release (guestfs_h *g, struct inspect_fs *fs, const char *filename) } /* If we haven't got all the fields, exit right away. */ - if (distro == OS_DISTRO_UNKNOWN || product_name == NULL || - version.v_major == -1 || version.v_minor == -1) + if (distro == OS_DISTRO_UNKNOWN || product_name == NULL) return 0; + if (version.v_major == -1 || version.v_minor == -1) { + /* Void Linux has no VERSION_ID (yet), but since it's a rolling + * distro and has no other version/release-like file. *...
2017 Sep 12
0
[PATCH v2 5/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306).
...); } append_list_format ("id=hd%zu", i); @@ -408,6 +411,10 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) data->qemu_version = guestfs_int_qemu_version (g, data->qemu_data); debug (g, "qemu version: %d.%d", data->qemu_version.v_major, data->qemu_version.v_minor); + data->qemu_mandatory_locking = + guestfs_int_qemu_mandatory_locking (g, data->qemu_data); + debug (g, "qemu mandatory locking: %s", + data->qemu_mandatory_locking ? "yes" : "no"); } /* Using virti...
2017 Jun 21
0
[PATCH v8 07/42] common/utils: Move ‘uefi.c’ to ‘lib/’.
...70336e2..190b5cdd2 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -1011,4 +1011,16 @@ extern bool guestfs_int_version_cmp_ge (const struct version *a, const struct ve #define version_init_null(v) guestfs_int_version_from_values (v, 0, 0, 0) #define version_is_null(v) ((v)->v_major == 0 && (v)->v_minor == 0 && (v)->v_micro == 0) +/* uefi.c */ +struct uefi_firmware { + const char *code; /* code file (NULL = end of list) */ + const char *code_debug; /* code file with debugging msgs (may be NULL)*/ + const char *vars; /* vars template file */ + int...
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html and this requires the utilities refactoring posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html Inspection is now complete[*], although not very well tested. I'm intending to compare the output of many guests using old & new virt-inspector to see if I can find any
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...aracter is a digit. + */ + if (content && c_isdigit (content[0])) { + struct version version; + const int res = guestfs_int_version_from_x_y_or_x (g, &version, content); + if (res < 0) + return -1; + else if (res > 0) { + osinfo->major_version = version.v_major; + osinfo->minor_version = version.v_minor; + } + } + + return 0; +} + +static int +parse_family (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->type = OS_TYPE_UNKNOWN; + + content = (char *) xmlNodeGetContent (node); +...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...aracter is a digit. + */ + if (content && c_isdigit (content[0])) { + struct version version; + const int res = guestfs_int_version_from_x_y_or_x (g, &version, content); + if (res < 0) + return -1; + else if (res > 0) { + osinfo->major_version = version.v_major; + osinfo->minor_version = version.v_minor; + } + } + + return 0; +} + +static int +parse_family (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->type = OS_TYPE_UNKNOWN; + + content = (char *) xmlNodeGetContent (node); +...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...aracter is a digit. + */ + if (content && c_isdigit (content[0])) { + struct version version; + const int res = guestfs_int_version_from_x_y_or_x (g, &version, content); + if (res < 0) + return -1; + else if (res > 0) { + osinfo->major_version = version.v_major; + osinfo->minor_version = version.v_minor; + } + } + + return 0; +} + +static int +parse_family (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo) +{ + CLEANUP_FREE char *content = NULL; + + osinfo->type = OS_TYPE_UNKNOWN; + + content = (char *) xmlNodeGetContent (node); +...