Merging upstream version 2.4+really2.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
58746eb9a3
commit
1fbda9c797
458 changed files with 5141 additions and 7138 deletions
14
util/json.c
14
util/json.c
|
@ -35,24 +35,10 @@ struct json_object *util_json_object_new_uint64(uint64_t i)
|
|||
|
||||
}
|
||||
|
||||
static int util_json_object_string_to_number(struct json_object *jso,
|
||||
struct printbuf *pb, int level,
|
||||
int flags)
|
||||
{
|
||||
ssize_t len = json_object_get_string_len(jso);
|
||||
|
||||
printbuf_memappend(pb, json_object_get_string(jso), len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct json_object *util_json_object_new_uint128(nvme_uint128_t val)
|
||||
{
|
||||
struct json_object *obj;
|
||||
|
||||
obj = json_object_new_string(uint128_t_to_string(val));
|
||||
json_object_set_serializer(obj, util_json_object_string_to_number, NULL, NULL);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue