From 41deae7550141ed79f3949d52d88c9166d194f90 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sat, 6 Jul 2024 00:52:48 +0900 Subject: [PATCH] nvme: delete smart-log command fahrenheit option Used locale for the fahrenheit temperature instead. Signed-off-by: Tokunori Ikegami --- Documentation/nvme-smart-log.txt | 6 +----- completions/_nvme | 2 -- completions/bash-nvme-completion.sh | 2 +- nvme.c | 8 +------- nvme.h | 1 - 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Documentation/nvme-smart-log.txt b/Documentation/nvme-smart-log.txt index 659ed222..c08f523c 100644 --- a/Documentation/nvme-smart-log.txt +++ b/Documentation/nvme-smart-log.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'nvme smart-log' [--namespace-id= | -n ] - [--raw-binary | -b] [--fahrenheit | -f] + [--raw-binary | -b] [--output-format= | -o ] [--verbose | -v] DESCRIPTION @@ -38,10 +38,6 @@ OPTIONS --raw-binary:: Print the raw SMART log buffer to stdout. --f:: ---fahrenheit:: - Print the temperatures in degrees fahrenheit. - -o :: --output-format=:: Set the reporting format to 'normal', 'json' or 'binary'. Only one diff --git a/completions/_nvme b/completions/_nvme index f7eb40db..96ffd3fa 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -999,8 +999,6 @@ _nvme () { -b':alias to --raw-binary' --verbose':show infos verbosely' -v':alias to --verbose' - --fahrenheit'show temperatures in degrees fahrenheit' - -f':alias to --fahrenheit' ) _arguments '*:: :->subcmds' _describe -t commands "nvme smart-log options" _smartlog diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index 00dcb307..682c0b7d 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -149,7 +149,7 @@ nvme_list_opts () { ;; "smart-log") opts+=" --namespace-id= -n --raw-binary -b \ - --output-format= -o --verbose -v --fahrenheit -f" + --output-format= -o --verbose -v" ;; "ana-log") opts+=" --output-format -o" diff --git a/nvme.c b/nvme.c index f3288cf0..0dbc2090 100644 --- a/nvme.c +++ b/nvme.c @@ -216,7 +216,6 @@ static const char *doper = "directive operation"; static const char *dry = "show command instead of sending"; static const char *dspec_w_dtype = "directive specification associated with directive type"; static const char *dtype = "directive type"; -static const char *fahrenheit = "show temperatures in degrees fahrenheit"; static const char *force_unit_access = "force device to commit data before command completes"; static const char *human_readable_directive = "show directive in readable format"; static const char *human_readable_identify = "show identify in readable format"; @@ -550,7 +549,6 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug __u32 namespace_id; bool raw_binary; bool human_readable; - bool fahrenheit; }; struct config cfg = { @@ -562,8 +560,7 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug NVME_ARGS(opts, OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace), OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw_output), - OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable_info), - OPT_FLAG("fahrenheit", 'f', &cfg.fahrenheit, fahrenheit)); + OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable_info)); err = parse_and_open(&dev, argc, argv, desc, opts); if (err) @@ -581,9 +578,6 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug if (cfg.human_readable) flags |= VERBOSE; - if (cfg.fahrenheit) - flags |= FAHRENHEIT; - smart_log = nvme_alloc(sizeof(*smart_log)); if (!smart_log) return -ENOMEM; diff --git a/nvme.h b/nvme.h index 051fdf00..e769c9af 100644 --- a/nvme.h +++ b/nvme.h @@ -38,7 +38,6 @@ enum nvme_print_flags { JSON = 1 << 1, /* display in json format */ VS = 1 << 2, /* hex dump vendor specific data areas */ BINARY = 1 << 3, /* binary dump raw bytes */ - FAHRENHEIT = 1 << 4, /* show temperatures in degrees fahrenheit */ }; typedef uint32_t nvme_print_flags_t; -- 2.50.1