Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvme: disable output-format option json value without json-c #2628

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ static struct program nvme = {
.extensions = &builtin,
};

#ifdef CONFIG_JSONC
const char *output_format = "Output format: normal|json|binary";
#else /* CONFIG_JSONC */
const char *output_format = "Output format: normal|binary";
#endif /* CONFIG_JSONC */
const char *timeout = "timeout value, in milliseconds";
const char *verbose = "Increase output verbosity";

Expand Down Expand Up @@ -480,8 +484,10 @@ int validate_output_format(const char *format, nvme_print_flags_t *flags)

if (!strcmp(format, "normal"))
f = NORMAL;
#ifdef CONFIG_JSONC
else if (!strcmp(format, "json"))
f = JSON;
#endif /* CONFIG_JSONC */
else if (!strcmp(format, "binary"))
f = BINARY;
else
Expand Down
Loading