Accepting request 427893 from home:morbidrsa
- Update to upstream release v0.9 - Remove merged remove-version-from-list.patch * New extensions, fabrics support, a bug fixes. The 'list' command is liberated from its udev dependency, and no longer requires CONFIG_IO_STRICT_DEVMEM be disabled. OBS-URL: https://build.opensuse.org/request/show/427893 OBS-URL: https://build.opensuse.org/package/show/Base:System/nvme-cli?expand=0&rev=18
This commit is contained in:
parent
f760a2e618
commit
615be67ff0
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 15 09:05:22 UTC 2016 - jthumshirn@suse.com
|
||||
|
||||
- Update to upstream release v0.9
|
||||
- Remove merged remove-version-from-list.patch
|
||||
* New extensions, fabrics support, a bug fixes. The 'list' command
|
||||
is liberated from its udev dependency, and no longer requires
|
||||
CONFIG_IO_STRICT_DEVMEM be disabled.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 31 11:31:15 UTC 2016 - jthumshirn@suse.com
|
||||
|
||||
|
@ -17,14 +17,13 @@
|
||||
|
||||
|
||||
Name: nvme-cli
|
||||
Version: 0.8
|
||||
Version: 0.9
|
||||
Release: 0
|
||||
Summary: Core nvme tools
|
||||
License: GPL-2.0
|
||||
Group: Hardware/Other
|
||||
Url: https://github.com/linux-nvme/nvme-cli
|
||||
Source: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
|
||||
Patch0: remove-version-from-list.patch
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExcludeArch: s390x
|
||||
@ -35,7 +34,6 @@ cli rpm installs core management tools with minimal dependencies.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
echo %{version} > version
|
||||
|
@ -1,83 +0,0 @@
|
||||
From 6ab2e9ef204053d82c1eb40e514119286749cefe Mon Sep 17 00:00:00 2001
|
||||
From: Keith Busch <keith.busch@intel.com>
|
||||
Date: Tue, 30 Aug 2016 08:49:19 -0600
|
||||
Subject: [PATCH] Remove version from list
|
||||
Git-commit: 6ab2e9ef204053d82c1eb40e514119286749cefe
|
||||
References: boo#986891
|
||||
|
||||
We can't reliably map controller registers due to kernel memory
|
||||
protections added in kernel commit 90a545e98, so we are removing its
|
||||
dependency for the 'list' command to run.
|
||||
|
||||
Signed-off-by: Keith Busch <keith.busch@intel.com>
|
||||
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
|
||||
---
|
||||
nvme.c | 30 ++++++------------------------
|
||||
1 file changed, 6 insertions(+), 24 deletions(-)
|
||||
|
||||
--- a/nvme.c
|
||||
+++ b/nvme.c
|
||||
@@ -710,23 +710,9 @@ struct list_item {
|
||||
int nsid;
|
||||
struct nvme_id_ns ns;
|
||||
unsigned block;
|
||||
- __le32 ver;
|
||||
};
|
||||
|
||||
#ifdef LIBUDEV_EXISTS
|
||||
-/* For pre NVMe 1.2 devices we must get the version from the BAR, not the
|
||||
- * ctrl_id.*/
|
||||
-static void get_version(struct list_item* list_item)
|
||||
-{
|
||||
- struct nvme_bar *bar;
|
||||
-
|
||||
- list_item->ver = list_item->ctrl.ver;
|
||||
- if (list_item->ctrl.ver)
|
||||
- return;
|
||||
- get_registers(&bar);
|
||||
- list_item->ver = bar->vs;
|
||||
-}
|
||||
-
|
||||
static void print_list_item(struct list_item list_item)
|
||||
{
|
||||
|
||||
@@ -748,25 +734,22 @@ static void print_list_item(struct list_
|
||||
char format[128];
|
||||
sprintf(format,"%3.0f %2sB + %2d B", (double)lba, l_suffix,
|
||||
list_item.ns.lbaf[(list_item.ns.flbas & 0x0f)].ms);
|
||||
- char version[128];
|
||||
- sprintf(version,"%d.%d", (list_item.ver >> 16),
|
||||
- (list_item.ver >> 8) & 0xff);
|
||||
|
||||
- printf("%-16s %-*.*s %-*.*s %-8s %-9d %-26s %-16s %-.*s\n", list_item.node,
|
||||
+ printf("%-16s %-*.*s %-*.*s %-9d %-26s %-16s %-.*s\n", list_item.node,
|
||||
(int)sizeof(list_item.ctrl.sn), (int)sizeof(list_item.ctrl.sn), list_item.ctrl.sn,
|
||||
(int)sizeof(list_item.ctrl.mn), (int)sizeof(list_item.ctrl.mn), list_item.ctrl.mn,
|
||||
- version, list_item.nsid, usage, format, (int)sizeof(list_item.ctrl.fr), list_item.ctrl.fr);
|
||||
+ list_item.nsid, usage, format, (int)sizeof(list_item.ctrl.fr), list_item.ctrl.fr);
|
||||
}
|
||||
|
||||
static void print_list_items(struct list_item *list_items, unsigned len)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
- printf("%-16s %-20s %-40s %-8s %-9s %-26s %-16s %-8s\n",
|
||||
- "Node", "SN", "Model", "Version", "Namespace", "Usage", "Format", "FW Rev");
|
||||
- printf("%-16s %-20s %-40s %-8s %-9s %-26s %-16s %-8s\n",
|
||||
+ printf("%-16s %-20s %-40s %-9s %-26s %-16s %-8s\n",
|
||||
+ "Node", "SN", "Model", "Namespace", "Usage", "Format", "FW Rev");
|
||||
+ printf("%-16s %-20s %-40s %-9s %-26s %-16s %-8s\n",
|
||||
"----------------", "--------------------", "----------------------------------------",
|
||||
- "--------", "---------", "--------------------------", "----------------", "--------");
|
||||
+ "---------", "--------------------------", "----------------", "--------");
|
||||
for (i = 0 ; i < len ; i++)
|
||||
print_list_item(list_items[i]);
|
||||
|
||||
@@ -833,7 +816,6 @@ static int list(int argc, char **argv, s
|
||||
return err;
|
||||
strcpy(list_items[count].node, node);
|
||||
list_items[count].block = S_ISBLK(nvme_stat.st_mode);
|
||||
- get_version(&list_items[count]);
|
||||
count++;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:70f515de401a16f0e67f64854d65f6ddcc1628325ae93caa31db6913252e3786
|
||||
size 162167
|
3
v0.9.tar.gz
Normal file
3
v0.9.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b47087cba2ea3f0d53ed9316dc7a13d9a2ad618abaeeda23d7f520035a62b3c
|
||||
size 167565
|
Loading…
Reference in New Issue
Block a user