Skip to content

Commit 3cc2197

Browse files
committed
dapustor: avoid sprinkling ifdefs
Use empty json functions instead without json. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 1b7ebe9 commit 3cc2197

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

plugins/dapustor/dapustor-nvme.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ struct nvme_extended_additional_smart_log {
9696
struct nvme_additional_smart_log_item inflight_write_io_cmd;
9797
};
9898

99-
#ifdef CONFIG_JSONC
10099
static void show_dapustor_add_smart_log_jsn(struct nvme_additional_smart_log *smart,
101100
struct json_object *dev_stats)
102101
{
@@ -349,9 +348,6 @@ static void show_dapustor_smart_log_jsn(struct nvme_additional_smart_log *smart,
349348
json_print_object(root, NULL);
350349
json_free_object(root);
351350
}
352-
#else /* CONFIG_JSONC */
353-
#define show_dapustor_smart_log_jsn(smart, ext_smart, nsid, devname, has_ext)
354-
#endif /* CONFIG_JSONC */
355351

356352
static void show_dapustor_add_smart_log(struct nvme_additional_smart_log *smart)
357353
{

util/json.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ struct json_object;
6161
#define json_object_add_value_uint64(o, k, v) ((void)(v))
6262
#define json_object_add_value_uint128(o, k, v)
6363
#define json_object_add_value_double(o, k, v)
64+
#define json_object_add_value_float(o, k, v)
6465
#define json_object_add_value_array(o, k, v) ((void)(v))
6566
#define json_object_add_value_object(o, k, v) ((void)(v))
6667
#define json_array_add_value_object(o, k) ((void)(k))

0 commit comments

Comments
 (0)