The data_size and metadata_size fields in the config struct are declared as
__u32, but should actually be __u64. The current types cause issues in the
argument parsing functions depending on machine architecture and endianness. In
ppc64, using __u32 causes "data size not provided" errors due to the way writes
are being done by argconfig_parse() at src/argconfig.c. Changing the types to
__u64 should fix this behaviour and is in accordance to the CFG_LONG_SUFFIX
flag.
Signed-off-by: Heitor Ricardo Alves de Siqueira <halves@linux.vnet.ibm.com>
seehearfeel [Sat, 26 Mar 2016 13:14:43 +0000 (21:14 +0800)]
Fix the bug of Model Number and display the info of Serial Number
OK, I see, thanks for your suggestion.
I have modified the related code of Serial Number, Model Number and Firmware Revision,
other fields are not be changed because the length can not be properly figured out by
the print format specifier, (int)sizeof(field) is too big and (int)strlen(field) is random.
In addition, fix a minor spelling mistake "Namepace" to "Namespace".
seehearfeel [Tue, 22 Mar 2016 11:23:15 +0000 (19:23 +0800)]
Fix the bug of Model Number and display the info of Serial Number
According to the NVMe Specification, there is an error when display Model Number.
In addition, currently it does not display the info of Serial Number, so add it.
Keith Busch [Thu, 3 Mar 2016 20:20:16 +0000 (13:20 -0700)]
Simplify show-regs
You only need to specify the name of the device. The character or block
device was never necessary to show the registers since we're opening the
sysfs resource entry. This is backwards compatibles with the old way as
the basename was stripped from the path before.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Thu, 3 Mar 2016 20:11:52 +0000 (13:11 -0700)]
Simplify non-argument params
The device is the first non-argument param. The handling for this is
done by argparse, and we expect to move it to the end. Instead, it'd be
easier to let getopt's handle this by not providing the '-' signifier
to treat non-arguments as arguments. This simplifies opening the device.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Thu, 3 Mar 2016 14:32:18 +0000 (07:32 -0700)]
Fixing a get and set features
The get feature argument for extensive decoding for readibility is 'H'
rather than 'h', and a set feature value can be 0xffffffff, so fixing
that bogus check.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Wed, 2 Mar 2016 23:59:18 +0000 (16:59 -0700)]
Misc fixes
A few errors in the moving occured. The short non-option arguments
weren't working, gnu parse option parameters were mishandled, and get
features used the wrong opcode.
Folding in help text updates.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Breno Leitao [Wed, 2 Mar 2016 21:13:16 +0000 (16:13 -0500)]
Fix English typos only
This is a commit to fix a type across the project, from "identifer" to
"identifier".
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.
Keith Busch [Wed, 2 Mar 2016 00:07:18 +0000 (17:07 -0700)]
Simplify argument parsing
This combines short and long option names into the same argument entry
so we don't need to duplicate each entry. This also greatly simplifies
the help printing, which had an undocumented dependency of argument
ordering just to print correctly.
The simpler setup makes it easier to add new commands.
Signed-off-by: Keith Busch <keith.busch@intel.com>
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
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.