Resolves: RHEL-104383, subvendor_device output is not matching
This commit is contained in:
parent
239ff3e3ec
commit
df2bafe04b
102
lsvpd-1.2.15-subvendor_device-not-matching.patch
Normal file
102
lsvpd-1.2.15-subvendor_device-not-matching.patch
Normal file
@ -0,0 +1,102 @@
|
||||
commit 67945a23ac7c680359c81df4eb20769d996615e5
|
||||
Author: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Date: Mon May 12 14:23:28 2025 +0530
|
||||
|
||||
lsvpd: Enhance tools to print device information in tuple format
|
||||
|
||||
Update device information display to use tuple format showing vendor ID,
|
||||
device ID, subsystem vendor ID, and subsystem device ID. Change output
|
||||
from ethernet (10141015) to ethernet (15b3,1015), (1014,061f)
|
||||
for improved readability and more complete device identification.
|
||||
|
||||
Currently, for a PCI device,
|
||||
|
||||
./lscfg -vl 0033:01:00.0
|
||||
0033:01:00.0 uverbs12 mlx5_12 enP51p1s0f0 ptp24 ethernet U78D2.001.RCH0060-P1-C3-T1
|
||||
ethernet (10141015)
|
||||
|
||||
With the fix,
|
||||
|
||||
./lscfg -vl 0033:01:00.0
|
||||
0033:01:00.0 uverbs12 mlx5_12 enP51p1s0f0 ptp24 ethernet U78D2.001.RCH0060-P1-C3-T1
|
||||
ethernet (15b3,1015), (1014,061f)
|
||||
|
||||
Tested-by: Krishan Saraswat <krishang@linux.vnet.ibm.com>
|
||||
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
|
||||
diff --git a/src/internal/sys_interface/sysfstreecollector.cpp b/src/internal/sys_interface/sysfstreecollector.cpp
|
||||
index 03eb7da..07bcf68 100644
|
||||
--- a/src/internal/sys_interface/sysfstreecollector.cpp
|
||||
+++ b/src/internal/sys_interface/sysfstreecollector.cpp
|
||||
@@ -1490,7 +1490,6 @@ ERROR:
|
||||
fillMe->mManufacturer.setValue( val,
|
||||
50, __FILE__, __LINE__ );
|
||||
|
||||
- os << hex << setw( 4 ) << setfill( '0' ) << manID;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1500,7 +1499,6 @@ ERROR:
|
||||
fillMe->mManufacturer.setValue( val, 50,
|
||||
__FILE__, __LINE__ );
|
||||
|
||||
- os << hex << setw( 4 ) << setfill( '0' ) << subMan;
|
||||
}
|
||||
|
||||
// Fill Device Model
|
||||
@@ -1509,7 +1507,6 @@ ERROR:
|
||||
{
|
||||
if( manID != UNKNOWN_ID )
|
||||
{
|
||||
- os << hex << setw( 4 ) << setfill( '0' )<< devID;
|
||||
val = mPciTable->getName( manID, devID );
|
||||
if( val != "" )
|
||||
fillMe->mModel.setValue( val, 80,
|
||||
@@ -1518,7 +1515,6 @@ ERROR:
|
||||
}
|
||||
else
|
||||
{
|
||||
- os << hex << setw( 4 ) << setfill( '0' )<< subID;
|
||||
val = mPciTable->getName( manID, devID, subID );
|
||||
if( val != "" )
|
||||
fillMe->mModel.setValue( val, 80, __FILE__, __LINE__ );
|
||||
@@ -1527,7 +1523,12 @@ ERROR:
|
||||
fillMe->mDescription.setValue( val, 80, __FILE__, __LINE__ );
|
||||
}
|
||||
|
||||
- if( os.str( ) != "ffffffff" )
|
||||
+ os << "(" << hex << setw(4) << setfill('0') << manID << ","
|
||||
+ << hex << setw(4) << setfill('0') << devID << "), ("
|
||||
+ << hex << setw(4) << setfill('0') << subMan << ","
|
||||
+ << hex << setw(4) << setfill('0') << subID << ")";
|
||||
+
|
||||
+ if( os.str( ) != "(ffff,ffff), (ffff,ffff)" )
|
||||
fillMe->mCDField.setValue( os.str( ), 100, __FILE__, __LINE__ );
|
||||
}
|
||||
|
||||
diff --git a/src/output/lscfg.cpp b/src/output/lscfg.cpp
|
||||
index 8c9eec7..bad23a8 100644
|
||||
--- a/src/output/lscfg.cpp
|
||||
+++ b/src/output/lscfg.cpp
|
||||
@@ -337,7 +337,7 @@ void printVPD( Component* root )
|
||||
|
||||
if( val != "" )
|
||||
{
|
||||
- os << " (" << val << ")";
|
||||
+ os << " " << val;
|
||||
}
|
||||
|
||||
if( val.length( ) + root->getDescription( ).length( ) <= 35 )
|
||||
diff --git a/src/output/lsvpd.cpp b/src/output/lsvpd.cpp
|
||||
index e77ffe0..70d4a9e 100644
|
||||
--- a/src/output/lsvpd.cpp
|
||||
+++ b/src/output/lsvpd.cpp
|
||||
@@ -169,7 +169,7 @@ void printVPD( Component* root )
|
||||
string val = string( root->getCD( ) );
|
||||
|
||||
if ( val != "" )
|
||||
- cout << " (" << val << ")";
|
||||
+ cout << " " << val;
|
||||
|
||||
cout << endl;
|
||||
}
|
||||
10
lsvpd.spec
10
lsvpd.spec
@ -1,12 +1,16 @@
|
||||
Name: lsvpd
|
||||
Version: 1.7.15
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: VPD/hardware inventory utilities for Linux
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://github.com/power-ras/%{name}/releases
|
||||
Source: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# upstream patches
|
||||
# lsvpd: Enhance tools to print device information in tuple format
|
||||
Patch10: lsvpd-1.2.15-subvendor_device-not-matching.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libvpd-devel >= 2.2.9
|
||||
BuildRequires: sg3_utils-devel
|
||||
@ -68,6 +72,10 @@ exit 0
|
||||
%dir %{_sysconfdir}/lsvpd
|
||||
|
||||
%changelog
|
||||
* Tue Aug 05 2025 Than Ngo <than@redhat.com> - 1.7.15-7
|
||||
- Resolves: RHEL-104383, subvendor_device output is not matching
|
||||
|
||||
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.7.15-6
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
||||
Loading…
Reference in New Issue
Block a user