]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: delete smart-log command fahrenheit option
authorTokunori Ikegami <ikegami.t@gmail.com>
Fri, 5 Jul 2024 15:52:48 +0000 (00:52 +0900)
committerDaniel Wagner <wagi@monom.org>
Tue, 9 Jul 2024 10:04:14 +0000 (12:04 +0200)
Used locale for the fahrenheit temperature instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Documentation/nvme-smart-log.txt
completions/_nvme
completions/bash-nvme-completion.sh
nvme.c
nvme.h

index 659ed222a8f79cad5db0ae46fd3fa2fc67235bac..c08f523cb28d3bd21860572d38d33f2146008f76 100644 (file)
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'nvme smart-log' <device> [--namespace-id=<nsid> | -n <nsid>]
-                       [--raw-binary | -b] [--fahrenheit | -f]
+                       [--raw-binary | -b]
                        [--output-format=<fmt> | -o <fmt>] [--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 <fmt>::
 --output-format=<fmt>::
        Set the reporting format to 'normal', 'json' or 'binary'. Only one
index f7eb40dbbde9b1c75cc9fd8e3d402b3bac14e253..96ffd3faa55682976e50dfb35ef74cea31b15529 100644 (file)
@@ -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
index 00dcb307af62cad8a1cc8c391f063f3e8cdfdd0b..682c0b7da1660682e5673256d2773259de28ef71 100644 (file)
@@ -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 f3288cf005c1f6c1f427f8e43b0393755f5343cb..0dbc20905681432f3865c43caef78b30b26b26be 100644 (file)
--- 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 051fdf0030b7f6f5e7f1956081b6da7f0eb3b4fb..e769c9af02d43697d3e50fb1950116f81b398b86 100644 (file)
--- 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;