forked from pool/libvirt
4daedcf6c9
- Revert switch to jansson boo#1104820 - Dropped: temp-build-fix.patch - Added: 9ed59012--revert-jansson1.patch, 54f2b5e3-revert-jansson2.patch, b56950fd-revert-jansson3.patch, 6c3d66ac-revert-jansson4.patch, 8e373e6d-revert-jansson5.patch, 6f99de31-revert-jansson6.patch, f204cf51-revert-jansson7.patch, 5a58b5ed-revert-jansson8.patch, 63f6e0e9-revert-jansson9.patch, 8687eba-revert-jansson10.patch, e96e71d8-revert-jansson11.patch, d99a8959-revert-jansson12.patch - spec: don't restart libvirt-guests when updating libvirt-client bsc#1104662 OBS-URL: https://build.opensuse.org/request/show/629264 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=701
74 lines
2.2 KiB
Diff
74 lines
2.2 KiB
Diff
commit 63f6e0e95036a0634ee8147ee7a463c4066fa720
|
|
Author: Ján Tomko <jtomko@redhat.com>
|
|
Date: Mon Aug 13 13:39:56 2018 +0200
|
|
|
|
Revert "Remove virJSONValueNewStringLen"
|
|
|
|
This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337.
|
|
|
|
Jansson cannot parse QEMU's quirky JSON.
|
|
Revert back to yajl.
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
|
|
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
Index: libvirt-4.6.0/src/libvirt_private.syms
|
|
===================================================================
|
|
--- libvirt-4.6.0.orig/src/libvirt_private.syms
|
|
+++ libvirt-4.6.0/src/libvirt_private.syms
|
|
@@ -2098,6 +2098,7 @@ virJSONValueNewNumberUint;
|
|
virJSONValueNewNumberUlong;
|
|
virJSONValueNewObject;
|
|
virJSONValueNewString;
|
|
+virJSONValueNewStringLen;
|
|
virJSONValueObjectAdd;
|
|
virJSONValueObjectAddVArgs;
|
|
virJSONValueObjectAppend;
|
|
Index: libvirt-4.6.0/src/util/virjson.c
|
|
===================================================================
|
|
--- libvirt-4.6.0.orig/src/util/virjson.c
|
|
+++ libvirt-4.6.0/src/util/virjson.c
|
|
@@ -420,6 +420,28 @@ virJSONValueNewString(const char *data)
|
|
}
|
|
|
|
|
|
+virJSONValuePtr
|
|
+virJSONValueNewStringLen(const char *data,
|
|
+ size_t length)
|
|
+{
|
|
+ virJSONValuePtr val;
|
|
+
|
|
+ if (!data)
|
|
+ return virJSONValueNewNull();
|
|
+
|
|
+ if (VIR_ALLOC(val) < 0)
|
|
+ return NULL;
|
|
+
|
|
+ val->type = VIR_JSON_TYPE_STRING;
|
|
+ if (VIR_STRNDUP(val->data.string, data, length) < 0) {
|
|
+ VIR_FREE(val);
|
|
+ return NULL;
|
|
+ }
|
|
+
|
|
+ return val;
|
|
+}
|
|
+
|
|
+
|
|
static virJSONValuePtr
|
|
virJSONValueNewNumber(const char *data)
|
|
{
|
|
Index: libvirt-4.6.0/src/util/virjson.h
|
|
===================================================================
|
|
--- libvirt-4.6.0.orig/src/util/virjson.h
|
|
+++ libvirt-4.6.0/src/util/virjson.h
|
|
@@ -59,6 +59,7 @@ int virJSONValueObjectAddVArgs(virJSONVa
|
|
|
|
|
|
virJSONValuePtr virJSONValueNewString(const char *data);
|
|
+virJSONValuePtr virJSONValueNewStringLen(const char *data, size_t length);
|
|
virJSONValuePtr virJSONValueNewNumberInt(int data);
|
|
virJSONValuePtr virJSONValueNewNumberUint(unsigned int data);
|
|
virJSONValuePtr virJSONValueNewNumberLong(long long data);
|