Skip to content

Commit

Permalink
ocp: replace to use json_object_* macros to obj_* macros
Browse files Browse the repository at this point in the history
Since currently mixed to use them in ocp-print-json.c then unify.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Dec 22, 2024
1 parent e21db3e commit 7fdaa72
Show file tree
Hide file tree
Showing 3 changed files with 353 additions and 415 deletions.
7 changes: 0 additions & 7 deletions nvme-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
#define array_add_obj json_array_add_value_object
#define array_add_str json_array_add_value_string

#define obj_add_array json_object_add_value_array
#define obj_add_int json_object_add_value_int
#define obj_add_obj json_object_add_value_object
#define obj_add_uint json_object_add_value_uint
#define obj_add_uint128 json_object_add_value_uint128
#define obj_add_uint64 json_object_add_value_uint64

static const uint8_t zero_uuid[16] = { 0 };
static struct print_ops json_print_ops;
static struct json_object *json_r;
Expand Down
7 changes: 7 additions & 0 deletions nvme-print.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ typedef struct nvme_effects_log_node {
#define STR_LEN 100

#define obj_add_str json_object_add_value_string
#define obj_add_int json_object_add_value_int
#define obj_add_uint json_object_add_value_uint
#define obj_add_uint64 json_object_add_value_uint64
#define obj_add_uint128 json_object_add_value_uint128
#define obj_add_obj json_object_add_value_object
#define obj_add_array json_object_add_value_array
#define obj_new_str_len json_object_new_string_len

void d(unsigned char *buf, int len, int width, int group);
void d_raw(unsigned char *buf, unsigned len);
Expand Down
Loading

0 comments on commit 7fdaa72

Please sign in to comment.