]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
9 years agoWhitespace fixes v0.4
Keith Busch [Fri, 26 Feb 2016 15:42:41 +0000 (08:42 -0700)]
Whitespace fixes

Just removing trailing whitespaces and putting braces where they belong.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoSplit display routines from cli
Keith Busch [Thu, 25 Feb 2016 22:38:49 +0000 (15:38 -0700)]
Split display routines from cli

All routines that decode and show the data are moved to a common file
separate from the command line interface.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoSplit ioctl command handling from cli
Keith Busch [Thu, 25 Feb 2016 22:19:51 +0000 (15:19 -0700)]
Split ioctl command handling from cli

Moving nvme ioctl handling from the command line interface into a
separate file.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoConsistent code formatting
Keith Busch [Tue, 1 Mar 2016 16:20:41 +0000 (09:20 -0700)]
Consistent code formatting

Used 'indent -linux' to quickly convert code style to linux conventions.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMerge pull request #61 from morbidrsa/master
keithbusch [Tue, 1 Mar 2016 15:02:14 +0000 (08:02 -0700)]
Merge pull request #61 from morbidrsa/master

README.md: Add the openSUSE Tumbleweed package

9 years agoREADME.md: Add the openSUSE Tumbleweed package
Johannes Thumshirn [Tue, 1 Mar 2016 11:01:17 +0000 (12:01 +0100)]
README.md: Add the openSUSE Tumbleweed package

Add the openSUSE Tumbleweed package to README.md

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
9 years agoDocumenation fixes
Keith Busch [Fri, 26 Feb 2016 15:30:21 +0000 (08:30 -0700)]
Documenation fixes

Addresing typos and a few subtle incorrect usages. '0x' is a required
prefix for parsing hex numbers.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoIgnore swp files
Keith Busch [Thu, 25 Feb 2016 22:42:11 +0000 (15:42 -0700)]
Ignore swp files

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMerge pull request #58 from leitao/master
keithbusch [Fri, 12 Feb 2016 15:37:02 +0000 (08:37 -0700)]
Merge pull request #58 from leitao/master

Fix debian scripts and typos

9 years agoFix English typos only
Breno Leitao [Fri, 12 Feb 2016 12:24:05 +0000 (10:24 -0200)]
Fix English typos only

This is a commit to fix typos accross the project, mainly the
following:

  * overriden -> overridden
  * paramter -> parameter
  * Comand -> Command
  * Offical -> Official

The motivation behind this fix is to make this package perfect to be
included in the Debian project. As it is, the lintian checker is
complainging about these typos using the tag spelling-error-in-manpage.

It was also requested by a Debian maintainer in the following review:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810033#38

9 years agoFix two debian/control issues
Breno Leitao [Thu, 14 Jan 2016 17:13:34 +0000 (12:13 -0500)]
Fix two debian/control issues

It was reported by a mentor on Debian[1], two problems were detected
and fixed:

 - Remove the . at the end of the package description, that caused error
   description-synopsis-might-not-be-phrased-properly.

 - Remove hard dependency for libudev0 | libudev1. It is being generated
   by dh_shlibdeps.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?att=0;msg=23;bug=810033

9 years agoChanging the debian maintainer
Breno Leitao [Thu, 14 Jan 2016 17:12:49 +0000 (12:12 -0500)]
Changing the debian maintainer

Adding myself as the Debian maintainer, since Keith is the upstream
author, and I will be the Debian maintainer for the package.

9 years agoMerge pull request #56 from FlorianHeigl/patch-2
Stephen Bates [Tue, 9 Feb 2016 00:12:14 +0000 (17:12 -0700)]
Merge pull request #56 from FlorianHeigl/patch-2

Add starter doc for AlpineLinux

9 years agoAdd starter doc for AlpineLinux
Florian Heigl [Sun, 7 Feb 2016 13:47:26 +0000 (14:47 +0100)]
Add starter doc for AlpineLinux

I've included two command examples, i hope that's not too much bloat. normally people will try to avoid using udev, but it's not really necessary either assuming everyone can ls /dev/nvme* ;)

9 years agoMerge pull request #55 from amluto/master
Stephen Bates [Fri, 5 Feb 2016 01:02:40 +0000 (18:02 -0700)]
Merge pull request #55 from amluto/master

README.md: Mention the Fedora package

9 years agoREADME.md: Mention the Fedora package
Andy Lutomirski [Fri, 5 Feb 2016 00:56:17 +0000 (16:56 -0800)]
README.md: Mention the Fedora package

Signed-off-by: Andy Lutomirski <luto@kernel.org>
9 years agoAdd "CONTRIBUTING" file.
Keith Busch [Thu, 4 Feb 2016 17:48:07 +0000 (10:48 -0700)]
Add "CONTRIBUTING" file.

Setting general rules for contributing. Nothing is changing, but need
to make it explicit that contributions can't violate the software license.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMerge pull request #54 from lakshminarayanand/nvme-cli-config
keithbusch [Thu, 28 Jan 2016 14:29:07 +0000 (07:29 -0700)]
Merge pull request #54 from lakshminarayanand/nvme-cli-config

Memory leak fix at argconfig_parse_subopt_string of argconfig

9 years agoMemory leak fix at argconfig_parse_subopt_string of argconfig
lakshminarayanand [Thu, 28 Jan 2016 11:06:19 +0000 (16:36 +0530)]
Memory leak fix at argconfig_parse_subopt_string of argconfig

9 years agoMerge pull request #53 from amluto/nvme-list
keithbusch [Wed, 27 Jan 2016 03:30:27 +0000 (20:30 -0700)]
Merge pull request #53 from amluto/nvme-list

Restrict 'nvme list' to disks, i.e. exclude partitions

9 years agoMerge pull request #52 from amluto/decode-ps
keithbusch [Wed, 27 Jan 2016 03:27:26 +0000 (20:27 -0700)]
Merge pull request #52 from amluto/decode-ps

Decode power states more readably

9 years agoRestrict 'nvme list' to disks, i.e. exclude partitions
Andy Lutomirski [Wed, 27 Jan 2016 02:49:07 +0000 (18:49 -0800)]
Restrict 'nvme list' to disks, i.e. exclude partitions

This stops 'nvme list' from separately enumerating all partitions.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
9 years agoDecode ps active and idle power
Andy Lutomirski [Fri, 22 Jan 2016 20:55:59 +0000 (12:55 -0800)]
Decode ps active and idle power

Decode the data instead of displaying it in raw form.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
9 years agoImprove power state flags and max power decoding
Andy Lutomirski [Fri, 22 Jan 2016 20:51:08 +0000 (12:51 -0800)]
Improve power state flags and max power decoding

Signed-off-by: Andy Lutomirski <luto@kernel.org>
9 years agoMerge branch 'lakshminarayanand-nvme-cli-local'
Keith Busch [Thu, 21 Jan 2016 15:09:05 +0000 (08:09 -0700)]
Merge branch 'lakshminarayanand-nvme-cli-local'

9 years agoMerge pull request #50 from lakshminarayanand/nvme-cli-local
keithbusch [Thu, 21 Jan 2016 15:20:25 +0000 (08:20 -0700)]
Merge pull request #50 from lakshminarayanand/nvme-cli-local

Fixing Memory Leak

9 years agoMemory Leak Fix at nvme_passthru
Lakshmi Narayanand [Thu, 21 Jan 2016 15:05:46 +0000 (08:05 -0700)]
Memory Leak Fix at nvme_passthru

In nvme_passthru buffers "data and metadata" allocated are not getting
freed at the fail cases and hence might lead to memory leak. This patch
free the buffer before the return of the function.

[Fixed tab formatting and conditional braces]
Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFixing Memory Leak
LakshmiNarayanand [Thu, 21 Jan 2016 11:28:28 +0000 (16:58 +0530)]
Fixing Memory Leak

9 years agoFix udev flags assignment v0.3
Keith Busch [Wed, 20 Jan 2016 20:29:10 +0000 (13:29 -0700)]
Fix udev flags assignment

Fixes: https://github.com/linux-nvme/nvme-cli/issues/49
Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFixed README formatting.
Stephen Bates [Mon, 11 Jan 2016 13:55:20 +0000 (06:55 -0700)]
Fixed README formatting.

9 years agoMerge pull request #46 from leitao/master
keithbusch [Thu, 7 Jan 2016 18:08:01 +0000 (11:08 -0700)]
Merge pull request #46 from leitao/master

Fixes in the debian scripts

9 years agoAdd debian/changelog
Breno Leitao [Thu, 7 Jan 2016 18:03:16 +0000 (13:03 -0500)]
Add debian/changelog

I created debian/changelog for the first nvme-cli debianization relase.

I kept Keith as the maintainer for the package, so, it doesn't mean an NMU.
If I try to push this in the future, I might change the maintainer.

9 years agoDo not ignore debian/changelog
Breno Leitao [Thu, 7 Jan 2016 18:01:06 +0000 (13:01 -0500)]
Do not ignore debian/changelog

Changelog is required in order to build the package. As this project
keeps the debian scripts in the upstream source, changelog file is
one of the most important files to be kept here.

9 years agoFix debian copyright file to map Debp5
Breno Leitao [Thu, 7 Jan 2016 17:39:00 +0000 (12:39 -0500)]
Fix debian copyright file to map Debp5

The debian/copyright file must be machine-interpretable, yet human-readable,
while communicating all mandated upstream information, copyright notices and
licensing details.

This new format maps to DEBP5, as specified at
http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

9 years agoAdd homepage and fix version on Control
Breno Leitao [Thu, 7 Jan 2016 17:38:00 +0000 (12:38 -0500)]
Add homepage and fix version on Control

Add the project homepage and fix the Debian version file in the debian control
file.

Tested against lintian and no problem found, even with pedantic option.

9 years agoAdd debian watch file
Breno Leitao [Thu, 7 Jan 2016 17:36:50 +0000 (12:36 -0500)]
Add debian watch file

The file named watch in the debian directory is used to check for newer
versions of upstream software is available and to download it if necessary. The
download itself will be performed with the uscan program from the devscripts
package.

9 years agoFixed README for Ubuntu PPA
Stephen Bates [Mon, 4 Jan 2016 22:03:08 +0000 (15:03 -0700)]
Fixed README for Ubuntu PPA

9 years agoMerge pull request #45 from FlorianHeigl/patch-1
keithbusch [Wed, 30 Dec 2015 15:18:31 +0000 (08:18 -0700)]
Merge pull request #45 from FlorianHeigl/patch-1

typo fix

9 years agotypo fix
Florian Heigl [Wed, 30 Dec 2015 12:25:41 +0000 (13:25 +0100)]
typo fix

fixes a typo

9 years agoAdded information to README with respect to Ubuntu install.
Stephen Bates [Thu, 24 Dec 2015 18:12:47 +0000 (11:12 -0700)]
Added information to README with respect to Ubuntu install.

9 years agoFixed changelog for Ubuntu PPAs
Stephen Bates [Thu, 24 Dec 2015 17:00:34 +0000 (10:00 -0700)]
Fixed changelog for Ubuntu PPAs

The changelog generated in the nvme-cli Makefile was not generic
enough for PPAs which build for multiple versions of Ubuntu. This is
controlled via the NVME_DPKG_VERSION variable that can be passed into
the Makefile.

9 years agoMerge pull request #44 from ossobv/ossobv-casting-pointers-is-bad-mkay
keithbusch [Wed, 16 Dec 2015 15:22:38 +0000 (08:22 -0700)]
Merge pull request #44 from ossobv/ossobv-casting-pointers-is-bad-mkay

Don't cast pointers, cast values.

9 years agoDon't cast pointers, cast values.
Walter Doekes [Wed, 16 Dec 2015 14:08:11 +0000 (15:08 +0100)]
Don't cast pointers, cast values.

The compiler rightly warned about an issue in ed3848130, but the fix was
wrong.

There is no guarantee that an int is exactly 32 bits and no guarantee
that a long long is exactly 64 bits. The former one is guaranteed to be
at least 16 bits (but we can safely assume 32 for non-ancient machines).

Imagine an u32 array:

    0... 1... 2... 3... 4... 5...

Now cast the pointer to the zeroth element to a 64-bits-int-pointer;
64bit sized int are quite common.

    0.......  1.......  2.......

Writing to 0, 1 and 2 would put values in 0, 2 and 4 (on little endian).
And if there is enough data, it would overwrite the stack.

This change moves the casting to the point where the individual values
are copied. That's safe.

9 years agoAdded ubuntu PPA make target.
Stephen Bates [Tue, 15 Dec 2015 16:19:35 +0000 (09:19 -0700)]
Added ubuntu PPA make target.

As we move toward deploying nvme-cli (aka nvme-utils) via the ubuntu
distro we need a make target that builds the correct sources for a
PPA. For now this is a presonal PPA and can be tracked at:

https://launchpad.net/~sbates/+archive/ubuntu/ppa

Here we refactor the changelog creation and add a new make target
(deb-ppa).

9 years agoSubject: compilation issue on ppc.
Wen Xiong [Mon, 14 Dec 2015 19:12:53 +0000 (13:12 -0600)]
Subject: compilation issue on ppc.

We saw the following compilation issue on ppc.

[root@everest-lp2 nvme-cli]# make
cc -I ./src -D_GNU_SOURCE -std=gnu99 -O2 -g -Wall -Werror
-DNVME_VERSION='"0.2.15.gc4c2"' nvme.c  -o nvme argconfig.         o
suffix.o common.o
nvme.c: In function âmânvme.c:2227:2: error: passing argument 2 of
âgconfig_parse_comma_sep_array_longârom incompatible pointer type [-
Werror]
  ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, 256);
  ^
In file included from nvme.c:52:0:
src/argconfig.h:106:10: note: expected âng long unsigned int *âut
argument is of type âu64 *âunsigned
argconfig_parse_comma_sep_array_long(char *string, unsigned long long
*ret,
          ^
cc1: all warnings being treated as errors
make: *** [nvme] Error 1

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
9 years agoMake author in debian changelog a variable.
Stephen Bates [Mon, 14 Dec 2015 02:47:24 +0000 (19:47 -0700)]
Make author in debian changelog a variable.

9 years agoMerge pull request #41 from samiWaheed/master
keithbusch [Tue, 8 Dec 2015 23:01:52 +0000 (16:01 -0700)]
Merge pull request #41 from samiWaheed/master

Added decoding of temp sensors to the SMART log page (02h)

Thanks for the fix. I did not catch that a previous commit did lot more than just  _move_ the printing functions to a common library, creating this regression.

9 years agoAdded decoding of temp sensors to the SMART log page (02h)
Sami Waheed [Tue, 8 Dec 2015 22:51:24 +0000 (14:51 -0800)]
Added decoding of temp sensors to the SMART log page (02h)

- Display temperature sensors data using smart-log command
- Removed code that truncated the last byte of fr, mn, sn in id-ctrl.
Matched string format with list command

9 years agoMerge pull request #40 from ossobv/ossobv-make-deb-fixes
keithbusch [Fri, 4 Dec 2015 15:06:22 +0000 (08:06 -0700)]
Merge pull request #40 from ossobv/ossobv-make-deb-fixes

Improve debian package build process.

9 years agoImprove debian package build process.
Walter Doekes [Fri, 4 Dec 2015 13:41:39 +0000 (14:41 +0100)]
Improve debian package build process.

* The changes from 3686759 make the debian/rules a lot simpler.
* Fix so ld doesn't leave a.out turds.
* Add dist-orig make target that creates a reproducible orig.tar.gz.
  A reproducible source archive is a first step towards reproducible
  builds.
* Fix typo in debian package description.
* Add dist and pkg to the PHONY targets.

9 years agoMerge pull request #39 from pmmccorm/master
keithbusch [Thu, 3 Dec 2015 21:04:31 +0000 (14:04 -0700)]
Merge pull request #39 from pmmccorm/master

Makefile cleanup.

9 years agoMerge pull request #38 from pmmccorm/master
keithbusch [Thu, 3 Dec 2015 20:49:48 +0000 (13:49 -0700)]
Merge pull request #38 from pmmccorm/master

Factor out ID printing code into common.c

9 years agoMakefile cleanup.
Patrick McCormick [Thu, 3 Dec 2015 17:56:22 +0000 (12:56 -0500)]
Makefile cleanup.

Don't link with unused libs: -lm, -lpthread
Don't hardcode in 64 bit compile, this will break cross compilation
Put preprocessor flags in CPPFLAGS
Add to existing variables instead of var = $var pattern

Signed-off-by: Patrick McCormick <patrick.m.mccormick@intel.com>
9 years agoFactor out ID printing code into common.c
Patrick McCormick [Thu, 3 Dec 2015 15:27:33 +0000 (10:27 -0500)]
Factor out ID printing code into common.c

The printing output should be identical. The id structure
printing functions can be more or less used by lsnvme.

Signed-off-by: Patrick McCormick <patrick.m.mccormick@intel.com>
9 years agoMerge pull request #37 from ossobv/ossobv-add-debian-files
keithbusch [Thu, 3 Dec 2015 16:19:33 +0000 (09:19 -0700)]
Merge pull request #37 from ossobv/ossobv-add-debian-files

Create repository ready `make deb` build.

LGTM. Thanks!

9 years agoCreate repository ready `make deb` build.
Walter Doekes [Thu, 3 Dec 2015 13:11:33 +0000 (14:11 +0100)]
Create repository ready `make deb` build.

When running `make deb` on `wheezy` with version `0.2.5.ga6ce` it
creates these files:

    nvme-cli_0.2.5.ga6ce-1~wheezy_amd64.changes
    nvme-cli_0.2.5.ga6ce-1~wheezy_amd64.deb
    nvme-cli_0.2.5.ga6ce-1~wheezy.debian.tar.gz
    nvme-cli_0.2.5.ga6ce-1~wheezy.dsc
    nvme-cli_0.2.5.ga6ce.orig.tar.gz

These can be included in your package archive, so they can be fetched
through apt-get.

9 years agoRemove uapi header dependency
Keith Busch [Fri, 13 Nov 2015 22:38:18 +0000 (15:38 -0700)]
Remove uapi header dependency

This wasn't even correct since the source includes the local header,
and is almost always ahead of the uapi version anyway.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agofix off by one error
Keith Busch [Wed, 28 Oct 2015 21:51:58 +0000 (15:51 -0600)]
fix off by one error

Need to use a larger int type because 256 doesn't fit in 8 bits, and
subtract 1 becase number of ranges is 0's based.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoAdd data-set management command
Keith Busch [Fri, 23 Oct 2015 22:56:07 +0000 (16:56 -0600)]
Add data-set management command

By popular demand...

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoUpdate documetatation
Keith Busch [Wed, 21 Oct 2015 16:20:14 +0000 (10:20 -0600)]
Update documetatation

Fixing the command in delete-ns and re-running asciidoc to flush all
changes to the repo.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFix 32 bit compilation v0.2
Keith Busch [Tue, 20 Oct 2015 17:54:47 +0000 (11:54 -0600)]
Fix 32 bit compilation

Addressing issue:

  https://github.com/linux-nvme/nvme-cli/issues/35

Unfortunetly no testing that I'm aware of uses 32-bit by default, so I
suspect we've not seen the last 32-bit issue in this project's life.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoDebian package fixes
Keith Busch [Tue, 20 Oct 2015 15:46:36 +0000 (09:46 -0600)]
Debian package fixes

Set the correct architecture and library dependencies.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoAdd deb package target
Keith Busch [Mon, 19 Oct 2015 19:33:01 +0000 (13:33 -0600)]
Add deb package target

Note the make clean looks a little dangerous here. Just to be aware of
if we ever name a file or directory "nvme-<something" in the future.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoProvide rpm build target
Keith Busch [Mon, 19 Oct 2015 17:40:14 +0000 (11:40 -0600)]
Provide rpm build target

Makes creating an RPM package easy.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFixup version file
Keith Busch [Thu, 15 Oct 2015 21:15:58 +0000 (15:15 -0600)]
Fixup version file

Some mixups from trying to copy other projects led to incorrect
description.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoIgnore generated version file
Keith Busch [Thu, 15 Oct 2015 21:11:38 +0000 (15:11 -0600)]
Ignore generated version file

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoPrint status to stderr on r/w commands
Keith Busch [Thu, 15 Oct 2015 14:15:43 +0000 (08:15 -0600)]
Print status to stderr on r/w commands

The option exists to pipe the data through stdout, so we don't want to
potentially contaminate user data with program output.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoDifferent file handle for metadata
Keith Busch [Wed, 14 Oct 2015 19:19:47 +0000 (13:19 -0600)]
Different file handle for metadata

Allow a user to specify a different file for metadata rather than assume
it is contigous with the data.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoAdd a version v0.1
Keith Busch [Tue, 6 Oct 2015 22:36:53 +0000 (16:36 -0600)]
Add a version

Starting with v0.1.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoUpdated license on bash scripts
Stephen Bates [Mon, 28 Sep 2015 19:57:45 +0000 (13:57 -0600)]
Updated license on bash scripts

Two bash scripts were missed for the GPLv2 licensing. Fixing that with this commit.

9 years agoMerge pull request #34 from ajorg/master
keithbusch [Mon, 28 Sep 2015 19:42:18 +0000 (13:42 -0600)]
Merge pull request #34 from ajorg/master

Makefile fixes for packagers (DESTDIR / PREFIX)

9 years agoMakefile fixes for packagers (DESTDIR / PREFIX)
Andrew Jorgensen [Mon, 28 Sep 2015 19:27:48 +0000 (12:27 -0700)]
Makefile fixes for packagers (DESTDIR / PREFIX)

Adds DESTDIR and PREFIX in appropriate places
Adds share/ to the man path
Lets the packager override PREFIX

9 years agoMerge pull request #33 from lsgunth/master
keithbusch [Fri, 25 Sep 2015 15:50:16 +0000 (09:50 -0600)]
Merge pull request #33 from lsgunth/master

Modified the license of the code pulled from libargconfig to be GPLv2

9 years agoModified the license of the code pulled from libargconfig to be GPLv2
Logan Gunthorpe [Fri, 25 Sep 2015 15:34:35 +0000 (09:34 -0600)]
Modified the license of the code pulled from libargconfig to be GPLv2

There have been legal concerns of linking Apache licensed code with
GPLv2 code. This change modifies the license of the code originating
from libargconfig. All of the copyright holders (including myself and
PMC Sierra represented by Stephen Bates <Stephen.Bates@pmcs.com>) have
signed off on this change.

9 years agoFix nvme.c licence to GPLv2
Keith Busch [Tue, 22 Sep 2015 22:01:48 +0000 (16:01 -0600)]
Fix nvme.c licence to GPLv2

Fixing comment to match the source's appropriate license.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMerge pull request #31 from samiWaheed/master
keithbusch [Tue, 22 Sep 2015 20:28:06 +0000 (14:28 -0600)]
Merge pull request #31 from samiWaheed/master

 Change default NSID in get-feature function. Fixed format of LBA range output

9 years agoCorrected IEEE byte order in id-cntrl
Sami Waheed [Mon, 21 Sep 2015 16:01:20 +0000 (09:01 -0700)]
Corrected IEEE byte order in id-cntrl

Fixed byte order of IEEE in show_nvme_id_ctrl

9 years agoChanged default NSID in get-feature function. Fixed format of LBA range output
Sami Waheed [Tue, 15 Sep 2015 22:29:04 +0000 (15:29 -0700)]
Changed default NSID in get-feature function.  Fixed format of LBA range output

- Changed default NSID to 1 in get-feature function.   Some features
require a valid NSID (i.e. lba range type)
- Fixed format of LBA range output
- Added description to the attributes field in LBA range output
- Changed default NSID to 0xffffffff in get_log (Matches help
documentation now)

9 years agoMerge remote-tracking branch 'linux-nvme/master'
Sami Waheed [Mon, 14 Sep 2015 22:33:18 +0000 (15:33 -0700)]
Merge remote-tracking branch 'linux-nvme/master'

9 years agoMerge pull request #29 from samiWaheed/master
keithbusch [Thu, 10 Sep 2015 14:11:57 +0000 (08:11 -0600)]
Merge pull request #29 from samiWaheed/master

Added a decode option for all mandatory and optional Feature Identifiers fields

9 years agoAdded a decode option for all mandatory and optional Feature Identifiers
Sami Waheed [Wed, 9 Sep 2015 22:19:52 +0000 (15:19 -0700)]
Added a decode option for all mandatory and optional Feature Identifiers

- Using --human-readable option with the get-feature command will decode
the fields of the specified FID.

9 years agoAdd namespace list option for all namespaces
root [Fri, 4 Sep 2015 21:23:58 +0000 (15:23 -0600)]
Add namespace list option for all namespaces

Add flag to toggle CNS from 2 to 0x10, showing either active namespaces
or all namespaces.

Signed-off-by: root <root@polestar>
9 years agoOpen device for namespace deletion
Keith Busch [Fri, 4 Sep 2015 17:21:52 +0000 (11:21 -0600)]
Open device for namespace deletion

So you can actually delete the namespace.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoUpdated .gitignore
Stephen Bates [Wed, 2 Sep 2015 20:44:20 +0000 (14:44 -0600)]
Updated .gitignore

9 years agoImproved list command formatting
Stephen Bates [Wed, 2 Sep 2015 20:41:28 +0000 (14:41 -0600)]
Improved list command formatting

9 years agoFix data size on controller list
Keith Busch [Tue, 1 Sep 2015 21:47:24 +0000 (15:47 -0600)]
Fix data size on controller list

The parsing is corrupting data on a list.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFix unsigned integers
Keith Busch [Fri, 28 Aug 2015 16:19:38 +0000 (10:19 -0600)]
Fix unsigned integers

Reported that using valid 32 bit integers causes errors do to type
signedness.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoUse device maximum for error log entries
Keith Busch [Fri, 28 Aug 2015 14:42:00 +0000 (08:42 -0600)]
Use device maximum for error log entries

It's been reported that some controllers return error if more logs were
requested than the device's max. This patch overrides the user's request,
or the default if the option was not given, with the device's max if
the setting exceeds it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMake timeout a parameter for format
Keith Busch [Fri, 28 Aug 2015 14:35:42 +0000 (08:35 -0600)]
Make timeout a parameter for format

Allows a user to override the timeout value, defaults to 2 minutes.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoFix compiler warning on format string
Keith Busch [Fri, 21 Aug 2015 19:51:59 +0000 (13:51 -0600)]
Fix compiler warning on format string

Reported-by: Georg <>
Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoMerge pull request #25 from paul-grabinar/master
keithbusch [Mon, 10 Aug 2015 14:34:22 +0000 (08:34 -0600)]
Merge pull request #25 from paul-grabinar/master

Allow for firmware activation that needs a reset

9 years agoAllow for firmware activation that needs a reset
Paul Grabinar [Mon, 10 Aug 2015 12:28:03 +0000 (13:28 +0100)]
Allow for firmware activation that needs a reset

On a firmware activate, some drives require a reset before the new
firmware can be used. Such drives return a status 0x10b to the activate
request.
Rather than treat this as an error, tell this user the activation was
successful, but a reset is required.

9 years agoUse hex for sgls print format
Keith Busch [Thu, 6 Aug 2015 21:37:58 +0000 (15:37 -0600)]
Use hex for sgls print format

It's a bit field, better reprsented by hex.

Signed-off-by: Keith Busch <keith.busch@intel.com>
9 years agoadd help strings and submenus
kaoudis [Wed, 5 Aug 2015 16:39:14 +0000 (10:39 -0600)]
add help strings and submenus

Add relevant help to nvme commands and command options.
Don't seg fault when trying to print help strings.
Don't declare "-h" an unrecognized option; print help menu instead.

Signed-off-by: kaoudis <kaoudis@colorado.edu>
9 years agoMerge pull request #24 from kaoudis/master
keithbusch [Wed, 5 Aug 2015 16:24:39 +0000 (10:24 -0600)]
Merge pull request #24 from kaoudis/master

[v2] add bash + zsh autocompletions

LGTM

10 years agoadd bash and zsh autocompletion files and readme
kaoudis [Mon, 3 Aug 2015 19:13:17 +0000 (13:13 -0600)]
add bash and zsh autocompletion files and readme

10 years agoMerge pull request #23 from paul-grabinar/master
keithbusch [Tue, 28 Jul 2015 17:47:49 +0000 (11:47 -0600)]
Merge pull request #23 from paul-grabinar/master

Allow longer timeout for format

This seems okay for now. Long term, we should make every command accept a 'timeout' parameter.

10 years agoAllow longer timeout for format
Paul Grabinar [Thu, 23 Jul 2015 20:43:29 +0000 (21:43 +0100)]
Allow longer timeout for format

Some NVMe drives take longer than 60 seconds to perform a format on a
namespace. Increase the timeout for the format to 120 seconds.

10 years agoMerge pull request #21 from mihu/asmart
keithbusch [Wed, 22 Jul 2015 17:47:28 +0000 (11:47 -0600)]
Merge pull request #21 from mihu/asmart

add additional smart log

The "pragma" usage works for me, so making the assumption it's portable.

10 years agoremove usage of typedef
Michal Humpula [Wed, 22 Jul 2015 17:40:01 +0000 (19:40 +0200)]
remove usage of typedef