__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)
{
"Get Intel vendor specific additional smart log (optionally, for the specified namespace), and show it.";
const char *namespace = "(optional) desired namespace";
const char *raw = "Dump output in binary format";
+#ifdef CONFIG_JSONC
const char *json = "Dump output in json format";
+#endif /* CONFIG_JSONC */
struct nvme_additional_smart_log smart_log;
struct nvme_dev *dev;
OPT_ARGS(opts) = {
OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace),
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw),
+#ifdef CONFIG_JSONC
OPT_FLAG("json", 'j', &cfg.json, json),
+#endif /* CONFIG_JSONC */
OPT_END()
};
* "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)
{
const char *desc = "Get Intel Latency Statistics log and show it.";
const char *raw = "Dump output in binary format";
+#ifdef CONFIG_JSONC
const char *json = "Dump output in json format";
+#endif /* CONFIG_JSONC */
const char *write = "Get write statistics (read default)";
struct config {
OPT_ARGS(opts) = {
OPT_FLAG("write", 'w', &cfg.write, write),
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw),
+#ifdef CONFIG_JSONC
OPT_FLAG("json", 'j', &cfg.json, json),
+#endif /* CONFIG_JSONC */
OPT_END()
};
if json_c_dep.found()
sources += [
- 'plugins/intel/intel-nvme.c',
'plugins/micron/micron-nvme.c',
'plugins/nbft/nbft-plugin.c',
'plugins/netapp/netapp-nvme.c',
'plugins/huawei/huawei-nvme.c',
'plugins/innogrit/innogrit-nvme.c',
'plugins/inspur/inspur-nvme.c',
+ 'plugins/intel/intel-nvme.c',
'plugins/memblaze/memblaze-nvme.c',
'plugins/shannon/shannon-nvme.c',
'plugins/toshiba/toshiba-nvme.c',