vapier      14/06/25 17:53:59

  Added:                fio-2.1.10-json.patch
  Log:
  Add fix from upstream for json int parsing.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.1                  sys-block/fio/files/fio-2.1.10-json.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-block/fio/files/fio-2.1.10-json.patch?rev=1.1&view=markup
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

Index: fio-2.1.10-json.patch
===================================================================
>From a606a802173272002e37be6475802be8c37481d6 Mon Sep 17 00:00:00 2001
From: Puthikorn Voravootivat <[email protected]>
Date: Tue, 24 Jun 2014 15:59:53 -0700
Subject: [PATCH] Cast input argument for json_object_add_value_int to long
 long

The latency related (and some other) variables type is uint32_t
but the JSON integer type is long long. So we need to cast
the numbers to long long type to make JSON output correctly.

Signed-off-by: Puthikorn Voravootivat <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
---
 json.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json.h b/json.h
index 081afd6..962c11c 100644
--- a/json.h
+++ b/json.h
@@ -52,7 +52,7 @@ void json_free_object(struct json_object *obj);
 
 int json_object_add_value_type(struct json_object *obj, const char *name, int 
type, ...);
 #define json_object_add_value_int(obj, name, val) \
-       json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (val))
+       json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) 
(val))
 #define json_object_add_value_float(obj, name, val) \
        json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val))
 #define json_object_add_value_string(obj, name, val) \
-- 
2.0.0





Reply via email to