summaryrefslogtreecommitdiffstats
path: root/nvme.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:11:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:11:33 +0000
commita751023422eadf87cd8d6484878193a4914a9d85 (patch)
tree3fca0ae6325173fc2583e7d88abe4c38e6193277 /nvme.h
parentAdding upstream version 2.0. (diff)
downloadnvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.tar.xz
nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.zip
Adding upstream version 2.1~rc0.upstream/2.1_rc0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nvme.h')
-rw-r--r--nvme.h41
1 files changed, 1 insertions, 40 deletions
diff --git a/nvme.h b/nvme.h
index 6dc6ad1..5afeece 100644
--- a/nvme.h
+++ b/nvme.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Definitions for the NVM Express interface
* Copyright (c) 2011-2014, Intel Corporation.
@@ -22,47 +23,7 @@
#include <sys/time.h>
#include "plugin.h"
-#ifdef CONFIG_JSONC
-#include <json.h>
-
-#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) \
- json_object_object_add(o, k, json_object_new_int(v))
-#define json_object_add_value_int(o, k, v) \
- json_object_object_add(o, k, json_object_new_int(v))
-#ifdef CONFIG_JSONC_14
-#define json_object_add_value_uint64(o, k, v) \
- json_object_object_add(o, k, json_object_new_uint64(v))
-#else
-#define json_object_add_value_uint64(o, k, v) \
- if ((v) > UINT_MAX) { \
- fprintf(stderr, "Value overflow in %s", k); \
- json_object_object_add(o, k, json_object_new_int(-1)); \
- } else \
- json_object_object_add(o, k, json_object_new_int(v))
-#endif
-#define json_object_add_value_float(o, k, v) \
- json_object_object_add(o, k, json_object_new_double(v))
-#define json_object_add_value_string(o, k, v) \
- json_object_object_add(o, k, json_object_new_string(v))
-#define json_object_add_value_array(o, k, v) \
- json_object_object_add(o, k, v)
-#define json_object_add_value_object(o, k, v) \
- json_object_object_add(o, k, v)
-#define json_array_add_value_object(o, k) \
- json_object_array_add(o, k)
-#define json_array_add_value_string(o, v) \
- json_object_array_add(o, json_object_new_string(v))
-#define json_print_object(o, u) \
- printf("%s", json_object_to_json_string_ext(o, \
- JSON_C_TO_STRING_PRETTY | \
- JSON_C_TO_STRING_NOSLASHESCAPE))
-#else
#include "util/json.h"
-#endif
#include "util/argconfig.h"
enum nvme_print_flags {