__u8 mic_fw[4];
};
-#ifdef CONFIG_JSONC
static void json_intel_id_ctrl(struct nvme_vu_id_ctrl_field *id,
char *health, char *bl, char *ww, char *mic_bl, char *mic_fw,
struct json_object *root)
json_object_add_value_string(root, "mic_bl", mic_bl);
json_object_add_value_string(root, "mic_fw", mic_fw);
}
-#else /* CONFIG_JSONC */
-#define json_intel_id_ctrl(id, health, bl, ww, mic_bl, mic_fw, root)
-#endif /* CONFIG_JSONC */
static void intel_id_ctrl(__u8 *vs, struct json_object *root)
{
return __id_ctrl(argc, argv, cmd, plugin, intel_id_ctrl);
}
-#ifdef CONFIG_JSONC
static void show_intel_smart_log_jsn(struct nvme_additional_smart_log *smart,
unsigned int nsid, const char *devname)
{
json_print_object(root, NULL);
json_free_object(root);
}
-#else /* CONFIG_JSONC */
-#define show_intel_smart_log_jsn(smart, nsid, devname)
-#endif /* CONFIG_JSONC */
static char *id_to_key(__u8 id)
{
* "type" : "write" or "read",
* "values" : {
*/
-#ifdef CONFIG_JSONC
static void lat_stats_make_json_root(
struct json_object *root, struct json_object *bucket_list,
int write)
json_print_object(root, NULL);
json_free_object(root);
}
-#endif /* CONFIG_JSONC */
static void show_lat_stats_3_0(struct intel_lat_stats *stats)
{
}
}
-#ifdef CONFIG_JSONC
static void json_lat_stats_v1000_0(struct optane_lat_stats *stats, int write)
{
int i;
json_free_object(root);
}
-#endif /* CONFIG_JSONC */
static void show_lat_stats_v1000_0(struct optane_lat_stats *stats, int write)
{
}
-#ifdef CONFIG_JSONC
static void json_lat_stats(int write)
{
switch (media_version[MEDIA_MAJOR_IDX]) {
}
printf("\n");
}
-#else /* CONFIG_JSONC */
-#define json_lat_stats(write)
-#endif /* CONFIG_JSONC */
static void print_dash_separator(int count)
{
/* Wrappers around json-c's API */
#define json_create_object(o) json_object_new_object(o)
-#define json_create_array(a) json_object_new_array(a)
#define json_free_object(o) json_object_put(o)
#define json_free_array(a) json_object_put(a)
#define json_object_add_value_uint(o, k, v) \
#define json_object_add_value_string(o, k, v)
#define json_create_object(o) NULL
-#define json_create_array(a) NULL
#define json_free_object(o) ((void)(o))
#define json_object_add_value_uint(o, k, v) ((void)(v))
#define json_object_add_value_int(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))
#define json_print_object(o, u) ((void)(o))
+#define json_object_new_array(a) NULL
#define json_object_array_add(o, k) ((void)(k))
#endif /* CONFIG_JSONC */
+#define json_create_array(a) json_object_new_array(a)
+
#endif /* __JSON__H */