]>
www.infradead.org Git - users/hch/nvme-cli.git/log
Narasimhan V [Mon, 20 Jan 2020 10:34:37 +0000 (16:04 +0530)]
Tests: Hande string encoding and handling failures
Handling string encoding to utf-8 and also string handling in
tests.
Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
Hannes Reinecke [Thu, 16 Jan 2020 12:57:46 +0000 (13:57 +0100)]
Makefile: use UDEVRULESDIR instead of UDEVDIR
The SUSE rpm macros only have UDEVRULESDIR, not UDEVDIR.
So introduce a UDEVRULESDIR variable which is preset to
UDEVDIR/rules.d
Signed-off-by: Hannes Reinecke <hare@suse.de>
Haochen Tong [Thu, 9 Jan 2020 19:16:23 +0000 (20:16 +0100)]
Makefile: generate Dracut config according to UDEVDIR
Signed-off-by: Haochen Tong <i@hexchain.org>
Wen Xiong [Wed, 8 Jan 2020 20:24:41 +0000 (12:24 -0800)]
Add additional smart log critical warn decoding
Provide a user option to request additional smart log page decoding,
and print out detailed critical warning when requested.
Signed-off-by: Wendy Xiong<wenxiong@linux.vnet.ibm.com>
[merge up, rename json keys]
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 7 Jan 2020 20:55:21 +0000 (13:55 -0700)]
New tag for missing docs
The previous release tag missed adding documentation required for a
successful install.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 7 Jan 2020 19:33:10 +0000 (12:33 -0700)]
Add new wdc documentation
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 7 Jan 2020 18:25:29 +0000 (11:25 -0700)]
Release v1.10
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 7 Jan 2020 18:48:44 +0000 (11:48 -0700)]
Regen documentation
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 7 Jan 2020 18:46:41 +0000 (11:46 -0700)]
Use asprintf for long names
It's too easy to observe snprintf truncation warnings when using long
strings.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Jeff Lien [Tue, 7 Jan 2020 15:20:23 +0000 (09:20 -0600)]
[NVME-CLI] Add documentation file for vs-error-reason-identifier WDC
plugin command.
[NVME-CLI] Minor updates/corrections to the clear-fw-activate-history
and vs-fw-activate-history command help text.
Jeff Lien [Tue, 7 Jan 2020 15:16:09 +0000 (09:16 -0600)]
[NVME-CLI] Add support for WDC plugin command - vs-error-reason-identifier
[NVME-CLI] Reverse enable/disable bit on the vs-telemetry-controller-option
WDC plugin command
James Smart [Tue, 7 Jan 2020 17:02:57 +0000 (10:02 -0700)]
Fix systemd service script use of CONNECT_ARGS env var
In testing, some environments are not properly expanding CONNECT_ARGS.
Change systemd service file use of CONNECT_ARGS to be encapsulated by
apostrophes and parens.
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
root [Tue, 24 Dec 2019 09:42:56 +0000 (17:42 +0800)]
Shannon Plugin update.
Keith Busch [Fri, 20 Dec 2019 22:12:43 +0000 (07:12 +0900)]
Doc/Makefile: Introduce 'quiet' build option
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 20 Dec 2019 22:02:41 +0000 (07:02 +0900)]
Makefile: use 'quiet' compile
Just using a simpler compile output.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 20 Dec 2019 21:58:16 +0000 (06:58 +0900)]
Makefile: Use special variables
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 20 Dec 2019 17:15:36 +0000 (02:15 +0900)]
micron: don't ignore 'system()' return value
Some compilers will generate warnings that this return value can't be
ignored.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 20 Dec 2019 16:01:38 +0000 (01:01 +0900)]
Fix libhugetlbfs flags
Allocating a region uses GHR_ flags, not GHP_ types.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 18 Dec 2019 19:05:22 +0000 (04:05 +0900)]
Regenerate documentation
Signed-off-by: Keith Busch <kbusch@kernel.org>
Hanumanthu Hanok [Wed, 27 Nov 2019 00:53:10 +0000 (06:23 +0530)]
Micron plugin updates
Heiko Thiery [Wed, 18 Dec 2019 05:19:09 +0000 (06:19 +0100)]
README.md: Mention the buildroot package
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Simon Schricker [Tue, 17 Dec 2019 09:49:35 +0000 (10:49 +0100)]
nvmf-autoconnect: add udev rules to set iopolicy for certain NetApp devices
Keith Busch [Mon, 16 Dec 2019 15:56:53 +0000 (00:56 +0900)]
Fix intel json latency statistics output format
Missing any support for the json output.
Link: https://github.com/linux-nvme/nvme-cli/commit/b7eb621f1a998f9b7a58501fdf6e6773ddc937ff#commitcomment-36448196
Signed-off-by: Keith Busch <kbusch@kernel.org>
Kevin Chau [Thu, 19 Sep 2019 01:57:15 +0000 (18:57 -0700)]
intel: Add function lat-stats to cli
Adds the lat-stats function to intel plugin.
If lat-stats-tracking is enabled, lat-stats will print out latency
statistics according to the user's desired format.
Auto detects intel drives to print the correct format.
Can output as raw binary, a formatted histogram, or as formatted json.
Signed-off-by: Kevin Chau <kchaumein@gmail.com>
Jeff Lien [Wed, 11 Dec 2019 19:56:38 +0000 (13:56 -0600)]
[NVMe-CLI] Update documentation for telemetry data retrieval to
vs-internal-log wdc plugin command.
Jeff Lien [Wed, 11 Dec 2019 19:54:57 +0000 (13:54 -0600)]
[NVMe-CLI] Add support to retrieve telemetry data in vs-internal-log
Jeff Lien [Fri, 6 Dec 2019 15:21:18 +0000 (09:21 -0600)]
[nvme-cli] Add documentation file for new wdc plugin command -
vs-telemetry-controller-option
Jeff Lien [Fri, 6 Dec 2019 15:19:11 +0000 (09:19 -0600)]
[nvme-cli] Add support for wdc plugin command - vs-telemetry-controller-option
Andreas Wachowski [Sat, 7 Dec 2019 21:25:15 +0000 (22:25 +0100)]
Fix typo (bulit -> built)
Kelly Ursenbach [Wed, 4 Dec 2019 19:45:39 +0000 (12:45 -0700)]
Warn on admin-passthru opcode not matching read/write flag
Opcode bits 1:0 indicate the direction of data transfer. These
bits should agree with the read or write flags provided.
Signed-off-by: Kelly Ursenbach <kelly.ursenbach@eideticom.com>
Tokunori Ikegami [Wed, 27 Nov 2019 15:53:04 +0000 (00:53 +0900)]
MAINT: Fix format compile warning error on 32 bit system
Since the following %lx format warning error was caused on 64 bit system.
error: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 2 has type ‘long long unsigned int’ [-Werror=format=]
So fix this by using %" PRIx64 " format instead as generic.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Keith Busch [Tue, 3 Dec 2019 21:18:44 +0000 (06:18 +0900)]
Merge branch 'Dequan-Dera-dera-plugin'
Keith Busch [Tue, 3 Dec 2019 21:18:30 +0000 (06:18 +0900)]
Merge branch 'dera-plugin' of https://github.com/Dequan-Dera/nvme-cli into Dequan-Dera-dera-plugin
Simon Schricker [Fri, 29 Nov 2019 09:52:05 +0000 (10:52 +0100)]
nvme-cli: Check for sysfs interface before NVMe discovery
This prevents an unnecessary error message in the case that the nvme-fc
kernel module is not loaded and the
/sys/class/fc/fc_udev_device/nvme_discovery
handle is not available.
wudequan [Tue, 26 Nov 2019 08:42:25 +0000 (16:42 +0800)]
Merge branch 'dera-plugin' of github.com:Dequan-Dera/nvme-cli into dera-plugin
wudequan [Tue, 26 Nov 2019 02:31:31 +0000 (10:31 +0800)]
Merge branch 'master' of github.com:linux-nvme/nvme-cli into dera-plugin
wudequan [Tue, 26 Nov 2019 02:31:31 +0000 (10:31 +0800)]
Merge branch 'master' of github.com:linux-nvme/nvme-cli into dera-plugin
Keith Busch [Sun, 24 Nov 2019 21:03:15 +0000 (14:03 -0700)]
Revert "Add Dera plugin extension."
This reverts commit
8086ab1751f820e449b63932d286bc45e229f94b .
Keith Busch [Sun, 24 Nov 2019 21:03:13 +0000 (14:03 -0700)]
Revert "Add Dera plugin extension."
This reverts commit
fb46db77ff65412ebc5568ff36aa5a2dd011834c .
wudequan [Mon, 18 Nov 2019 02:44:12 +0000 (10:44 +0800)]
Add Dera plugin extension.
Add stat sub-command to retrieve Dera device status and additional SMART log.
wudequan [Mon, 18 Nov 2019 02:44:12 +0000 (10:44 +0800)]
Add Dera plugin extension.
Add stat sub-command to retrieve Dera device status and additional SMART log.
Keith Busch [Fri, 22 Nov 2019 00:12:59 +0000 (09:12 +0900)]
Improve self test log command
Show the page's valid entries even if no test is actively running,
and be less verbose about the output unless requested.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Revanth Rajashekar [Thu, 21 Nov 2019 19:55:16 +0000 (12:55 -0700)]
nvme-cli: Update err to 0 in get_telemetry_log
Err needs to be updated to 0 else err contains bs(no. of bytes written).
This gets passd onto nvme_status_to_errno, thus returning irrelevant errno.
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Keith Busch [Thu, 21 Nov 2019 19:04:11 +0000 (04:04 +0900)]
fixup up self-test log when no test is in progress
Link: https://github.com/linux-nvme/nvme-cli/issues/612
Signed-off-by: Keith Busch <kbusch@kernel.org>
Revanth Rajashekar [Thu, 21 Nov 2019 18:52:05 +0000 (11:52 -0700)]
nvme-cli: Update err value to 0 in get_ns_id func.
Err value should be updated to 0 on success of nvme_get_nsid,
else the File Descriptor is passed on to nvme_status_to_errno
which returns an irrelevant errno.
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
wudequan [Thu, 21 Nov 2019 03:41:44 +0000 (11:41 +0800)]
Merge branch 'dera-plugin' of github.com:Dequan-Dera/nvme-cli into dera-plugin
wudequan [Mon, 18 Nov 2019 02:44:12 +0000 (10:44 +0800)]
Add Dera plugin extension.
Add stat sub-command to retrieve Dera device status and additional SMART log.
Steven Seungcheol Lee [Sat, 16 Nov 2019 05:34:14 +0000 (14:34 +0900)]
nvme.c: create-ns arguments are added
ANA Group Identifier, NVM Set Identifier
Its based on NVMe 1.4 Spec
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
wudequan [Mon, 18 Nov 2019 02:44:12 +0000 (10:44 +0800)]
Add Dera plugin extension.
Add stat sub-command to retrieve Dera device status and additional SMART log.
Jeff Lien [Mon, 11 Nov 2019 15:41:52 +0000 (09:41 -0600)]
[NVMe-CLI] Get DUI for SN-340 failing with Data Area 4 - Buffer Misalignment
Keith Busch [Tue, 29 Oct 2019 02:22:06 +0000 (11:22 +0900)]
Minor intel-nvme print refactor
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 8 Nov 2019 00:59:06 +0000 (09:59 +0900)]
Use simpler nvme ioctl api for admin
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Mon, 4 Nov 2019 14:50:34 +0000 (23:50 +0900)]
Relocate functions and constants to the files that use them
Make more things static helps reduce what exports need to be tracked.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Thu, 7 Nov 2019 23:33:12 +0000 (08:33 +0900)]
Move all spec defined structs to single file
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Thu, 7 Nov 2019 23:25:06 +0000 (08:25 +0900)]
Update build rules for .c with no .h
Not all .c files have a .h, but we still want to ensure the compile options are
the same.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Thu, 7 Nov 2019 23:24:01 +0000 (08:24 +0900)]
Update my email address
Set to a working email address.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 30 Oct 2019 02:04:37 +0000 (11:04 +0900)]
Makefile: fix cleaning subdirectories
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Thu, 31 Oct 2019 00:17:54 +0000 (09:17 +0900)]
remove unused "paths" controller field
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 30 Oct 2019 01:28:11 +0000 (10:28 +0900)]
reign in line lengths
Line lengths have started to get out of control. Try to get these to 80
characters.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 29 Oct 2019 14:28:20 +0000 (23:28 +0900)]
Add print for directive receive
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 29 Oct 2019 11:01:57 +0000 (20:01 +0900)]
Unify print routines
Move all the binary/json/normal output handling into a single function
call for each structure that we print. This will reduce the API surface
that we have to maintain.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Thu, 7 Nov 2019 22:27:52 +0000 (07:27 +0900)]
regenerate documentation
Keith Busch [Mon, 4 Nov 2019 23:15:35 +0000 (08:15 +0900)]
fix fw-download reference to committing fw
Spec renamed the Firmware Download command to Firmware Commit.
Link: https://github.com/linux-nvme/nvme-cli/issues/601
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 29 Oct 2019 11:15:26 +0000 (20:15 +0900)]
argconfig: Remove unused paramters
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 6 Nov 2019 19:02:42 +0000 (04:02 +0900)]
fix huawei filter to search all namespaces
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 5 Nov 2019 18:22:53 +0000 (03:22 +0900)]
nvme-cli: Support for hugetlbfs
Some commands require exceptionally large data transfers, and the
kernel driver supports only a limited number of phyiscal segments per
command. To help support this, try to allocate physically contiguous
space via hugetlbfs and fallback to a normal malloc if that fails.
Rather than deal with the nuances of allocating huge pages, use
libhugetlbfs as a dependency.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Tue, 5 Nov 2019 15:12:30 +0000 (00:12 +0900)]
Remove all 'struct nvme_command' usage
This is a kernel only data structure, user space should use it's own
uapi defined passthrough command structure for all command formatting.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Revanth Rajashekar [Tue, 29 Oct 2019 00:02:30 +0000 (18:02 -0600)]
nvme-cli: Update PMR Capability and PMR Status
1. Adding Controller Memory Space Supported(CMSS) in PMRCAP
2. Adding Persistent Memory Region Status(CBAI) in PMRSTS
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Revanth Rajashekar [Mon, 28 Oct 2019 23:43:38 +0000 (17:43 -0600)]
nvme-cli: Update Controller Capabilities Register
1. Add Controller Memory Buffer Supported (CMBS)
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Revanth Rajashekar [Mon, 28 Oct 2019 23:20:29 +0000 (17:20 -0600)]
nvme-cli: Update NVMe Registers
1. Add Controller Memory Buffer Memory Space Control (CMBMSC)
2. Add Controller Memory Buffer Status (CMBSTS)
3. Add Persistent Memory Region Memory Space Control (PMRMSC)
Update show registers
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Keith Busch [Wed, 23 Oct 2019 02:40:09 +0000 (11:40 +0900)]
fixup attach-ns documentation
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 23 Oct 2019 02:04:23 +0000 (11:04 +0900)]
Merge pull request #578 from rgirasegit/patch-1
Add an example for attach-ns
rgirasegit [Wed, 23 Oct 2019 01:40:21 +0000 (07:10 +0530)]
Add files via upload
Keith Busch [Fri, 18 Oct 2019 19:40:28 +0000 (13:40 -0600)]
Merge pull request #593 from jeffreyalien/master
[NVMe-CLI] Updates to WDC plugin command vs-internal-log
Jeff Lien [Fri, 18 Oct 2019 18:09:21 +0000 (13:09 -0500)]
[NVMe-CLI] Updates and fixes to WDC plugin command vs-internal-log
for the SN340 drive.
Keith Busch [Mon, 14 Oct 2019 23:08:10 +0000 (08:08 +0900)]
Regen docs, add host-nqn man page
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Fri, 11 Oct 2019 21:53:28 +0000 (15:53 -0600)]
Merge pull request #592 from jeffreyalien/new_branch_name
New branch name
Jeff Lien [Fri, 11 Oct 2019 21:39:50 +0000 (16:39 -0500)]
[NVMe-ClI] Add Documentation files for clear-fw-activate-history command
Jeff Lien [Thu, 10 Oct 2019 20:56:01 +0000 (15:56 -0500)]
[NVMe-CLI] Add clear-fw-activate-history WDC plugin command
Jeff Lien [Thu, 10 Oct 2019 20:20:05 +0000 (15:20 -0500)]
Merge https://github.com/linux-nvme/nvme-cli
Keith Busch [Thu, 10 Oct 2019 19:35:56 +0000 (04:35 +0900)]
fix namespace checks for legacy list
First ensure the controller we're comparing with has been initialized, and then
compare the correct fields with each other. Previously had been comparing a
model number against the serial.
Link: http://lists.infradead.org/pipermail/linux-nvme/2019-October/027562.html
Reported-by: Jeff Lien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Jeff Lien [Wed, 9 Oct 2019 20:51:54 +0000 (15:51 -0500)]
Reset wdc_do_cap_dui default parameters to the proper values
Keith Busch [Wed, 9 Oct 2019 15:05:26 +0000 (09:05 -0600)]
Merge pull request #589 from sephalon/oe-recipe-readme
README.md: Mention the OpenEmbedded/Yocto recipe
Stefan Wiehler [Wed, 9 Oct 2019 14:49:24 +0000 (16:49 +0200)]
README.md: Mention the OpenEmbedded/Yocto recipe
Signed-off-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>
Keith Busch [Tue, 8 Oct 2019 21:19:27 +0000 (15:19 -0600)]
Merge pull request #584 from benreese0/master
Intel plugin: Adding fields to id-ctrl VU region
Ben Reese [Tue, 8 Oct 2019 19:24:34 +0000 (12:24 -0700)]
Intel plugin: Adding fields to id-ctrl VU region
Per https://github.com/linux-nvme/nvme-cli/pull/584/commits/
f33510efbf5192116e5757d13a02463d446a1dc5 #r332178975 removing pack pragma on vu_id_ctrl_field struct.
Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
Keith Busch [Mon, 7 Oct 2019 18:49:36 +0000 (12:49 -0600)]
Merge pull request #588 from amluto/hostnqn
Use a systemd app-specific machine ID for hostnqn
Keith Busch [Mon, 7 Oct 2019 18:49:09 +0000 (12:49 -0600)]
Merge pull request #587 from RevanthRajashekar/error_log
nvme-cli: Add 'transport type' error to the error log
Keith Busch [Mon, 7 Oct 2019 18:48:34 +0000 (12:48 -0600)]
Merge pull request #586 from RevanthRajashekar/endu_grp_log
nvme-cli: Update nvme_endurance_group_log structure
Keith Busch [Mon, 7 Oct 2019 18:41:15 +0000 (12:41 -0600)]
Merge pull request #583 from pszczerx/nvme_list_bugfix
Check return value of scandir
Keith Busch [Mon, 7 Oct 2019 18:39:56 +0000 (12:39 -0600)]
Merge pull request #579 from RevanthRajashekar/self_test_log
nvme-cli: Add namespace-id option to self-test-log
Sagi Grimberg [Mon, 7 Oct 2019 18:22:21 +0000 (11:22 -0700)]
udev: convert the discovery event handler to the kernel support
The kernel will not send us a specific event for discovery but
rather the AEN result code. So expect NVME_AEN=0x70f002 for
discovery log change events.
Also, we don't get the NVME_CTRL_NAME env var anymore as this is
available from the device $kernel.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Andy Lutomirski [Thu, 3 Oct 2019 18:47:02 +0000 (11:47 -0700)]
Use a systemd app-specific machine ID for hostnqn
If /etc/nvme/hostnqn is not present, the fabric commands will ask
systemd for an app-specific machine ID as a fallback. This should
improve functionality if /etc/nvme/hostnqn is not present and should
allow packagers to avoid creating /etc/nvme/hostnqn.
Heavily based on an earlier patch from Tomasz Torcz.
Signed-off-by: Tomasz Torcz <tomek@pipebreaker.pl>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Revanth Rajashekar [Mon, 30 Sep 2019 23:40:18 +0000 (17:40 -0600)]
nvme-cli: Add 'transport type' error to the error log
* Update show_error_log
* Update json_error_log
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Revanth Rajashekar [Mon, 30 Sep 2019 22:35:40 +0000 (16:35 -0600)]
nvme-cli: Update nvme_endurance_group_log structure
* Update show_endurance_log
* Update json_endurance_log
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Ben Reese [Fri, 27 Sep 2019 17:05:32 +0000 (10:05 -0700)]
Adding fields to id-ctrl VU reigon for Intel DC drives
Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
Szczerbik, Przemyslaw [Fri, 27 Sep 2019 06:39:50 +0000 (07:39 +0100)]
Check return value of scandir
On error, scandir returns -1 and does not allocate memory
for namelist array. In some places in the code return value
of scandir call is not checked. This causes nvme-cli to
attempt to free() an uninitialized pointer, which subsequently
leads to segmentation fault.
To address this issue, check return value of scandir calls
throughout the code.
Signed-off-by: Szczerbik, Przemyslaw <przemyslawx.szczerbik@intel.com>
Revanth Rajashekar [Thu, 26 Sep 2019 16:34:20 +0000 (10:34 -0600)]
nvme-cli: Add namespace-id option to self-test-log
Instead of scanning all the namespaces for logs, the user can specify
the namespace from which he wants to retrieve the self-test log from.
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Keith Busch [Wed, 25 Sep 2019 17:26:12 +0000 (02:26 +0900)]
Report invalid output format for 'list' command
Don't fail silently if user provdies invalid 'list' options.
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Keith Busch [Wed, 25 Sep 2019 17:23:17 +0000 (02:23 +0900)]
Provide no-binary output format help text
The binary output is only for device returned structures. Remove this
help text for the 'list' command.
Signed-off-by: Keith Busch <kbusch@kernel.org>