Displaying 3 results from an estimated 3 matches for "qmp_schema_contains".
2017 Sep 12
0
[PATCH v2 4/5] lib: qemu: Add accessor to test if qemu does mandatory locking.
...ic ignored "-Wnull-dereference"
+#endif
+
+/**
+ * Test if the QMP schema contains a particular C<(key, value)> pair
+ * (anywhere). QMP is almost impossible to parse sanely so this is
+ * the minimum we need to detect if C<"locking"> is supported.
+ */
+static int
+qmp_schema_contains (yajl_val tree, const char *key, const char *value)
+{
+ size_t i;
+
+ if (YAJL_IS_OBJECT (tree)) {
+ for (i = 0; i < YAJL_GET_OBJECT(tree)->len; ++i) {
+ const char *k;
+ yajl_val v;
+
+ k = YAJL_GET_OBJECT(tree)->keys[i];
+ v = YAJL_GET_OBJECT(tree)->values[i]...
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 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly
drives
(https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html)
was wrong in a couple of respects. Firstly it didn't work, which I
didn't detect because my tests were testing the wrong thing. Oops.
Secondly it used a simple version number check to detect qemu binaries
implementing mandatory locking.