]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
dapustor: avoid sprinkling ifdefs
authorTokunori Ikegami <ikegami.t@gmail.com>
Sat, 21 Dec 2024 13:19:40 +0000 (22:19 +0900)
committerDaniel Wagner <wagi@monom.org>
Fri, 3 Jan 2025 09:21:08 +0000 (10:21 +0100)
Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
plugins/dapustor/dapustor-nvme.c
util/json.h

index 8dc12d553e840a2f481c7dd9dff3e15ca6c834df..b98b1a04581b06e1483f6acd1b025afa07009ea7 100644 (file)
@@ -96,7 +96,6 @@ struct nvme_extended_additional_smart_log {
        struct nvme_additional_smart_log_item   inflight_write_io_cmd;
 };
 
-#ifdef CONFIG_JSONC
 static void show_dapustor_add_smart_log_jsn(struct nvme_additional_smart_log *smart,
                                            struct json_object *dev_stats)
 {
@@ -349,9 +348,6 @@ static void show_dapustor_smart_log_jsn(struct nvme_additional_smart_log *smart,
        json_print_object(root, NULL);
        json_free_object(root);
 }
-#else /* CONFIG_JSONC */
-#define show_dapustor_smart_log_jsn(smart, ext_smart, nsid,  devname, has_ext)
-#endif /* CONFIG_JSONC */
 
 static void show_dapustor_add_smart_log(struct nvme_additional_smart_log *smart)
 {
index 94f0d32d073d1075535bd470c232bee44f060f19..7d2208ffbbb110b4407924a9866f91fbc4e2601a 100644 (file)
@@ -61,6 +61,7 @@ struct json_object;
 #define json_object_add_value_uint64(o, k, v) ((void)(v))
 #define json_object_add_value_uint128(o, k, v)
 #define json_object_add_value_double(o, k, v)
+#define json_object_add_value_float(o, k, v)
 #define json_object_add_value_array(o, k, v) ((void)(v))
 #define json_object_add_value_object(o, k, v) ((void)(v))
 #define json_array_add_value_object(o, k) ((void)(k))