Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-block/fio/files: fio-2.1.10-json.patch
Date: Wed, 25 Jun 2014 17:54:41
Message-Id: 20140625175359.B8E582004F@flycatcher.gentoo.org
1 vapier 14/06/25 17:53:59
2
3 Added: fio-2.1.10-json.patch
4 Log:
5 Add fix from upstream for json int parsing.
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
8
9 Revision Changes Path
10 1.1 sys-block/fio/files/fio-2.1.10-json.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-block/fio/files/fio-2.1.10-json.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-block/fio/files/fio-2.1.10-json.patch?rev=1.1&content-type=text/plain
14
15 Index: fio-2.1.10-json.patch
16 ===================================================================
17 From a606a802173272002e37be6475802be8c37481d6 Mon Sep 17 00:00:00 2001
18 From: Puthikorn Voravootivat <puthik@××××××××.org>
19 Date: Tue, 24 Jun 2014 15:59:53 -0700
20 Subject: [PATCH] Cast input argument for json_object_add_value_int to long
21 long
22
23 The latency related (and some other) variables type is uint32_t
24 but the JSON integer type is long long. So we need to cast
25 the numbers to long long type to make JSON output correctly.
26
27 Signed-off-by: Puthikorn Voravootivat <puthik@××××××××.org>
28 Signed-off-by: Jens Axboe <axboe@××.com>
29 ---
30 json.h | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33 diff --git a/json.h b/json.h
34 index 081afd6..962c11c 100644
35 --- a/json.h
36 +++ b/json.h
37 @@ -52,7 +52,7 @@ void json_free_object(struct json_object *obj);
38
39 int json_object_add_value_type(struct json_object *obj, const char *name, int type, ...);
40 #define json_object_add_value_int(obj, name, val) \
41 - json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (val))
42 + json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) (val))
43 #define json_object_add_value_float(obj, name, val) \
44 json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val))
45 #define json_object_add_value_string(obj, name, val) \
46 --
47 2.0.0