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* ;)
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>
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.
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/
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.
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.
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.
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).
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
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.
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
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.
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>
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.
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)
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>
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.
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.
Keith Busch [Tue, 9 Jun 2015 15:35:24 +0000 (09:35 -0600)]
Makefile: install documentation without building
Fixes dependency timestamp problems on cloning that 'make' rules
require it rebuild manpages even though this is not needed. We don't
want an 'asciidoc' dependency to build and install the program unless
you explicitly want to build the documentation, so changing the make
target's dependencies to not rebuild it.
Signed-off-by: Keith Busch <keith.busch@intel.com>