fix display when libhbalinux includes hosts without a serial number

This commit is contained in:
Chris Leech 2015-07-06 20:47:50 -07:00
parent 6d59a5c320
commit a57062ed26
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From cc0037c0091a2b9baf04a5101ec83a6ec8db448b Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Mon, 6 Jul 2015 20:43:56 -0700
Subject: [PATCH] fcoeadm: fix display when some netdevs don't have serial
numbers
---
fcoeadm_display.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 9b96170..3b7fff9 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -1294,9 +1294,8 @@ enum fcoe_status display_adapter_info(const char *ifname)
continue;
}
- if (!strncmp(hba_attrs->SerialNumber,
- shba_attrs->SerialNumber,
- strlen(hba_attrs->SerialNumber))) {
+ if (!strcmp(hba_attrs->SerialNumber,
+ shba_attrs->SerialNumber)) {
show_port_info(sport_attrs);
hba_table_list->hba_table[j].displayed = 1;
}
--
2.1.0

View File

@ -5,7 +5,7 @@
Name: fcoe-utils Name: fcoe-utils
Version: 1.0.30 Version: 1.0.30
Release: 1.git%{checkout}%{?dist} Release: 2.git%{checkout}%{?dist}
Summary: Fibre Channel over Ethernet utilities Summary: Fibre Channel over Ethernet utilities
Group: Applications/System Group: Applications/System
License: GPLv2 License: GPLv2
@ -19,6 +19,7 @@ ExcludeArch: ppc s390 s390x
Patch1: fcoe-utils-v1.0.30-1-fcoemon-Rework-daemonizing-and-error-handling.patch Patch1: fcoe-utils-v1.0.30-1-fcoemon-Rework-daemonizing-and-error-handling.patch
Patch2: fcoe-utils-v1.0.30-2-fcoemon-fix-IEEE-state-machine.patch Patch2: fcoe-utils-v1.0.30-2-fcoemon-fix-IEEE-state-machine.patch
Patch3: fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch Patch3: fcoe-utils-v1.0.30-3-sanmac-isn-t-required.patch
Patch4: fcoe-utils-v1.0.30-fcoeadm-fix-display-when-some-netdevs-don-t-have-ser.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libhbaapi-devel >= 2.2.9-6 BuildRequires: libhbaapi-devel >= 2.2.9-6
@ -85,6 +86,9 @@ rm -f %{buildroot}/%{_sysconfdir}/fcoe/config
%{_libexecdir}/fcoe/ %{_libexecdir}/fcoe/
%changelog %changelog
* Mon Jul 06 2015 Chris Leech <cleech@redhat.com> - 1.0.30-2
- fix display when libhbalinux includes hosts without a serial number
* Tue Jun 16 2015 Chris Leech <cleech@redhat.com> - 1.0.30-1 * Tue Jun 16 2015 Chris Leech <cleech@redhat.com> - 1.0.30-1
- rebase to upstream v1.0.30-2-g91c0c8c - rebase to upstream v1.0.30-2-g91c0c8c