Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lsvpd for openSUSE:Factory checked in at 2023-10-05 20:03:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lsvpd (Old) and /work/SRC/openSUSE:Factory/.lsvpd.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lsvpd" Thu Oct 5 20:03:16 2023 rev:65 rq:1114866 version:1.7.15 Changes: -------- --- /work/SRC/openSUSE:Factory/lsvpd/lsvpd.changes 2023-08-14 22:36:02.780525478 +0200 +++ /work/SRC/openSUSE:Factory/.lsvpd.new.28202/lsvpd.changes 2023-10-05 20:03:55.832398164 +0200 @@ -1,0 +2,10 @@ +Mon Oct 2 17:43:06 UTC 2023 - Michal Suchanek <msucha...@suse.com> + +- Update to version 1.7.15 (jsc#PED-5074) +- Drop upstreamed patches + * lsvpd-Add-NVME-f1h-log-page-VPD-information-parsing-.patch + * lsvpd-Update-nvme_template-with-logpage-format-for-0.patch + * lsvpd-Update-nvme_templates-with-logpage-format-for-.patch + * lsvpd-Fill-firmware-information-by-recursively-looki.patch + +------------------------------------------------------------------- Old: ---- lsvpd-1.7.14.tar.gz lsvpd-Add-NVME-f1h-log-page-VPD-information-parsing-.patch lsvpd-Fill-firmware-information-by-recursively-looki.patch lsvpd-Update-nvme_template-with-logpage-format-for-0.patch lsvpd-Update-nvme_templates-with-logpage-format-for-.patch New: ---- lsvpd-1.7.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lsvpd.spec ++++++ --- /var/tmp/diff_new_pack.zSraN3/_old 2023-10-05 20:03:57.072442963 +0200 +++ /var/tmp/diff_new_pack.zSraN3/_new 2023-10-05 20:03:57.072442963 +0200 @@ -17,17 +17,13 @@ Name: lsvpd -Version: 1.7.14 +Version: 1.7.15 Release: 0 Summary: VPD Hardware Inventory Utilities for Linux License: GPL-2.0-or-later Group: System/Monitoring URL: https://github.com/power-ras/lsvpd Source: https://github.com/power-ras/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: lsvpd-Add-NVME-f1h-log-page-VPD-information-parsing-.patch -Patch2: lsvpd-Update-nvme_template-with-logpage-format-for-0.patch -Patch3: lsvpd-Update-nvme_templates-with-logpage-format-for-.patch -Patch4: lsvpd-Fill-firmware-information-by-recursively-looki.patch BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: librtas-devel ++++++ lsvpd-1.7.14.tar.gz -> lsvpd-1.7.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/.travis.yml new/lsvpd-1.7.15/.travis.yml --- old/lsvpd-1.7.14/.travis.yml 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/.travis.yml 2023-09-28 16:02:21.000000000 +0200 @@ -1,15 +1,14 @@ language: cpp -os: linux-ppc64le - +arch: ppc64le +group: power-focal sudo: required services: docker - env: matrix: - - RUN_ON_CONTAINER=fedora-33 - - RUN_ON_CONTAINER=ubuntu-20.04 + - RUN_ON_CONTAINER=fedora-37 + - RUN_ON_CONTAINER=ubuntu-23.04 install: - docker build --pull -t ${RUN_ON_CONTAINER} -f lsvpd-ci/Dockerfile-${RUN_ON_CONTAINER} . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/ChangeLog new/lsvpd-1.7.15/ChangeLog --- old/lsvpd-1.7.14/ChangeLog 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/ChangeLog 2023-09-28 16:02:21.000000000 +0200 @@ -1,3 +1,8 @@ +1.7.15: Mahesh Salgaonkar <mah...@linux.ibm.com> - Mon Sep 25 2023 +- Display additional VPD information for NVMe devices +- Report correct microcode information for I/O devices +- Fix travis CI failures + 1.7.14: Mahesh Salgaonkar <mah...@linux.ibm.com> - Fri Feb 25 2022 - Prevent corruption of database file when running vpdupdate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/configure.ac new/lsvpd-1.7.15/configure.ac --- old/lsvpd-1.7.14/configure.ac 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/configure.ac 2023-09-28 16:02:21.000000000 +0200 @@ -3,7 +3,7 @@ AC_PREREQ([2.69]) #base -AC_INIT([lsvpd],[1.7.14],[mah...@linux.ibm.com,s...@linux.ibm.com]) +AC_INIT([lsvpd],[1.7.15],[mah...@linux.ibm.com,s...@linux.ibm.com]) AC_CONFIG_HEADER([config/config.h]) AC_SUBST(DATE, [`date`]) AC_CONFIG_MACRO_DIR([m4]) @@ -54,8 +54,8 @@ #AM_COND_IF([SGUTIL0], [], [ # echo "sgutils library is required for lsvpd" # exit 1 ]) -AM_CONDITIONAL([SGUTIL1], [ test x$SGUTILS_LIB == xsgutils ]) -AM_CONDITIONAL([SGUTIL2], [ test x$SGUTILS_LIB == xsgutils2 ]) +AM_CONDITIONAL([SGUTIL1], [ test x$SGUTILS_LIB = xsgutils ]) +AM_CONDITIONAL([SGUTIL2], [ test x$SGUTILS_LIB = xsgutils2 ]) PKG_CHECK_MODULES([LIBVPD2], [libvpd_cxx-2 >= 2.2.9],[],[ echo "VPD library(libvpd) version 2.2.9 is required for lsvpd" exit 1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-fedora-33 new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-fedora-33 --- old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-fedora-33 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-fedora-33 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -FROM fedora:33 - -RUN dnf -y install gcc-g++ make sg3_utils-devel zlib-devel iprutils -RUN dnf -y install libvpd-devel librtas-devel libtool automake rpm-build git -COPY . /build/ -WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-fedora-37 new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-fedora-37 --- old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-fedora-37 1970-01-01 01:00:00.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-fedora-37 2023-09-28 16:02:21.000000000 +0200 @@ -0,0 +1,6 @@ +FROM fedora:37 + +RUN dnf -y install gcc-g++ make sg3_utils-devel zlib-devel iprutils +RUN dnf -y install libvpd-devel librtas-devel libtool automake rpm-build git +COPY . /build/ +WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-ubuntu-20.04 new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-ubuntu-20.04 --- old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-ubuntu-20.04 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-ubuntu-20.04 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -qq -RUN apt-get update -qq && apt-get install -y automake libtool git make g++ libstdc++-7-dev -RUN apt-get update -qq && apt-get install -y libsqlite3-dev zlib1g-dev iprutils libsgutils2-dev -RUN apt-get update -qq && apt-get install -y librtas-dev librtasevent-dev libvpd-dev -COPY . /build/ -WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-ubuntu-23.04 new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-ubuntu-23.04 --- old/lsvpd-1.7.14/lsvpd-ci/Dockerfile-ubuntu-23.04 1970-01-01 01:00:00.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/Dockerfile-ubuntu-23.04 2023-09-28 16:02:21.000000000 +0200 @@ -0,0 +1,8 @@ +FROM ubuntu:23.04 +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update -qq +RUN apt-get update -qq && apt-get install -y automake libtool git make g++ libstdc++-10-dev pkg-config +RUN apt-get update -qq && apt-get install -y libsqlite3-dev zlib1g-dev iprutils libsgutils2-dev +RUN apt-get update -qq && apt-get install -y librtas-dev librtasevent-dev libvpd-dev +COPY . /build/ +WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/build-fedora-33.sh new/lsvpd-1.7.15/lsvpd-ci/build-fedora-33.sh --- old/lsvpd-1.7.14/lsvpd-ci/build-fedora-33.sh 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/build-fedora-33.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -#!/bin/bash - -set -uo pipefail -set -e -set -vx -MAKE_J=$(grep -c processor /proc/cpuinfo) - -./bootstrap.sh -./configure -make -j $MAKE_J -make -j $MAKE_J check -mkdir -p /root/rpmbuild/SOURCES/ -make dist-gzip -cp *.tar.gz /root/rpmbuild/SOURCES/ -rpmbuild -ba lsvpd.spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/build-fedora-37.sh new/lsvpd-1.7.15/lsvpd-ci/build-fedora-37.sh --- old/lsvpd-1.7.14/lsvpd-ci/build-fedora-37.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/build-fedora-37.sh 2023-09-28 16:02:21.000000000 +0200 @@ -0,0 +1,15 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx +MAKE_J=$(grep -c processor /proc/cpuinfo) + +./bootstrap.sh +./configure +make -j $MAKE_J +make -j $MAKE_J check +mkdir -p /root/rpmbuild/SOURCES/ +make dist-gzip +cp *.tar.gz /root/rpmbuild/SOURCES/ +rpmbuild -ba lsvpd.spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/build-ubuntu-20.04.sh new/lsvpd-1.7.15/lsvpd-ci/build-ubuntu-20.04.sh --- old/lsvpd-1.7.14/lsvpd-ci/build-ubuntu-20.04.sh 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/build-ubuntu-20.04.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -#!/bin/bash - -set -uo pipefail -set -e -set -vx -MAKE_J=$(grep -c processor /proc/cpuinfo) - -./bootstrap.sh -./configure -make -j $MAKE_J -make -j $MAKE_J check -make dist-gzip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd-ci/build-ubuntu-23.04.sh new/lsvpd-1.7.15/lsvpd-ci/build-ubuntu-23.04.sh --- old/lsvpd-1.7.14/lsvpd-ci/build-ubuntu-23.04.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd-ci/build-ubuntu-23.04.sh 2023-09-28 16:02:21.000000000 +0200 @@ -0,0 +1,12 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx +MAKE_J=$(grep -c processor /proc/cpuinfo) + +./bootstrap.sh +./configure +make -j $MAKE_J +make -j $MAKE_J check +make dist-gzip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/lsvpd.spec.in new/lsvpd-1.7.15/lsvpd.spec.in --- old/lsvpd-1.7.14/lsvpd.spec.in 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/lsvpd.spec.in 2023-09-28 16:02:21.000000000 +0200 @@ -79,6 +79,11 @@ %changelog +* Mon Sep 25 2023 - Mahesh Salgaonkar <mah...@linux.ibm.com> - 1.7.15 +- Display additional VPD information for NVMe devices +- Report correct microcode information for I/O devices +- Fix travis CI failures + * Fri Feb 25 2022 - Mahesh Salgaonkar <mah...@linux.ibm.com> - 1.7.14 - Prevent corruption of database file when running vpdupdate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/nvme_templates.conf new/lsvpd-1.7.15/nvme_templates.conf --- old/lsvpd-1.7.14/nvme_templates.conf 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/nvme_templates.conf 2023-09-28 16:02:21.000000000 +0200 @@ -1,2 +1,6 @@ "0001", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,FR:8" "0002", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,RM:8" +"0003", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,RM:8" +"0004", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,RM:8" +"0005", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,RM:8" +"0006", "_:4,ID:40,PN:12,EC:10,FN:12,AN:12,FC:4,CC:4,SN:8,Z0:8,Z1:4,Z2:10,Z3:12,Z4:1,Z5:2,Z6:8,Z7:3,Z8:5,Z9:2,ZA:4,ZB:4,ZC:2,MN:20,RM:8" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/src/include/icollector.hpp new/lsvpd-1.7.15/src/include/icollector.hpp --- old/lsvpd-1.7.14/src/include/icollector.hpp 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/src/include/icollector.hpp 2023-09-28 16:02:21.000000000 +0200 @@ -116,6 +116,25 @@ virtual ~ICollector( ){} protected: + /** Recursively search for attrName within a given path. + * + * @param path + * Directory path to search for filename. + * + * @param attrName + * Filename to search for. + * + * @return + * Path in which attrName file exists. + * + * If attrName is fwrev, and is found at + * /sys/devices/pci0020:01/0020:01:00.1/host4/scsi_host/host4/fwrev, + * searchFile() will return + * /sys/devices/pci0020:01/0020:01:00.1/host4/scsi_host/host4. + */ + string searchFile( const string& path, + const string& attrName ); + string getAttrValue( const string& path, const string& attrName ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/src/include/sysfstreecollector.hpp new/lsvpd-1.7.15/src/include/sysfstreecollector.hpp --- old/lsvpd-1.7.14/src/include/sysfstreecollector.hpp 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/src/include/sysfstreecollector.hpp 2023-09-28 16:02:21.000000000 +0200 @@ -139,6 +139,7 @@ void process_template(Component *fillMe, string *deviceType, char *data, int dataSize, string *format, int pageCode); + int collectNvmeVpd(Component *fillMe, int device_fd); int collectVpd(Component *fillMe, int device_fd, bool limitSCSISize); void fillSCSIComponent( Component* fillMe, bool limitSCSISize); @@ -224,7 +225,6 @@ */ void fillUSBDev( Component* fillMe, const string& sysDir ); - /** * Fill a NVMe device. * @@ -260,6 +260,15 @@ void fillIDEDev( Component* fillMe ); /** + * Fill a NVME device by reading and interpreting f1h log page + * information + * + * @param fillMe + * The Component to fill + */ + void fillPciNvmeVpd( Component* fillMe); + + /** * Gather PCI device specific vpd info. * * @param fillMe diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/src/internal/sys_interface/icollector.cpp new/lsvpd-1.7.15/src/internal/sys_interface/icollector.cpp --- old/lsvpd-1.7.14/src/internal/sys_interface/icollector.cpp 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/src/internal/sys_interface/icollector.cpp 2023-09-28 16:02:21.000000000 +0200 @@ -32,11 +32,46 @@ #include <fstream> #include <cstring> #include <bitset> +#include <iostream> +#include <dirent.h> +#include <string.h> using namespace std; namespace lsvpd { + + string ICollector::searchFile( const string& path, const string& attrName ) + { + DIR *dir; + struct dirent *entry; + + if ((dir = opendir(path.c_str())) == NULL) + return ""; + + while ((entry = readdir(dir)) != NULL) { + if (entry->d_type == DT_DIR) { + // Found a directory, but ignore . and .. + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; + string newPath = path + "/" + entry->d_name; + string result = searchFile(newPath, attrName); + if (result != "") { + closedir(dir); + return result; + } + } + else { + if (entry->d_name == attrName) { + closedir(dir); + return path; + } + } + } + closedir(dir); + return ""; + } + /** * Read a device attribute, given dev path and attribute name * @var path Full path to device in sysfs @@ -281,8 +316,10 @@ fillMe->addDeviceSpecific( key, "Device Specific", val, 90 ); else if( key == "AN" ) fillMe->addDeviceSpecific( key, "Final Assembly PN", val, 90 ); - else if( key == "ID" ) + else if( key == "ID" ) { + fillMe->mDescription.setValue( val, 90, file, lineNum ); fillMe->addDeviceSpecific( key, "Device Specific", val, 90 ); + } else if( key == "FR" ) fillMe->addDeviceSpecific( key, "Device Specific", val, 90 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/src/internal/sys_interface/sysfs_SCSI_Fill.cpp new/lsvpd-1.7.15/src/internal/sys_interface/sysfs_SCSI_Fill.cpp --- old/lsvpd-1.7.14/src/internal/sys_interface/sysfs_SCSI_Fill.cpp 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/src/internal/sys_interface/sysfs_SCSI_Fill.cpp 2023-09-28 16:02:21.000000000 +0200 @@ -1225,6 +1225,22 @@ return ret; } + int SysFSTreeCollector::collectNvmeVpd(Component *fillMe, int device_fd) + { + int rc; + char data[NVME_VPD_INFO_SIZE]; + + rc = nvme_read_vpd(device_fd, data); + if (rc) + return rc; + + rc = interpretNVMEf1hLogPage(fillMe, data); + if (rc) + return rc; + + return 0; + } + /******************************************************************** * @brief: High-level data collection call, using ioctl and doSGQuery * to collect relevant data which is returned for interpretation. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lsvpd-1.7.14/src/internal/sys_interface/sysfstreecollector.cpp new/lsvpd-1.7.15/src/internal/sys_interface/sysfstreecollector.cpp --- old/lsvpd-1.7.14/src/internal/sys_interface/sysfstreecollector.cpp 2022-02-27 17:52:13.000000000 +0100 +++ new/lsvpd-1.7.15/src/internal/sys_interface/sysfstreecollector.cpp 2023-09-28 16:02:21.000000000 +0200 @@ -1407,6 +1407,22 @@ return 0; } + void SysFSTreeCollector::fillPciNvmeVpd( Component* fillMe ) + { + int device_fd; + struct stat myDir; + string path; + path = fillMe->sysFsNode.getValue() + "/nvme"; + if (stat(path.c_str(), &myDir) < 0) + return; + device_fd = device_open(fillMe); + if (device_fd < 0) + return; + collectNvmeVpd(fillMe, device_fd); + close(device_fd); + return; + } + /* Parse VPD file */ void SysFSTreeCollector::fillPciDevVpd( Component* fillMe ) { @@ -1520,6 +1536,9 @@ /* Fill PCI device VPD info */ fillPciDevVpd(fillMe); + /* Fill NVME device VPD info using f1h log page */ + fillPciNvmeVpd(fillMe); + // Read the pci config file for Device Specific (YC) os.str( "" ); os << fillMe->sysFsNode.dataValue << "/config"; @@ -1818,6 +1837,10 @@ void SysFSTreeCollector::fillFirmware( Component* fillMe ) { + string result = ""; + string path = fillMe->getID(); + const string firmwareAttributes[] = {"fw_version", "firmware_rev"}; + const size_t firmwareAttributesSize = sizeof(firmwareAttributes) / sizeof(firmwareAttributes[0]); string classNode = fillMe->getClassNode(); if (classNode.length() > 0) { fillMe->mFirmwareVersion.setValue( getAttrValue( classNode, @@ -1829,6 +1852,23 @@ fillMe->mFirmwareVersion.setValue( getAttrValue( classNode, "firmware_rev" ), 30, __FILE__, __LINE__ ); } + + if (fillMe->mFirmwareLevel.dataValue.empty()) { + result = searchFile(path, "fwrev"); + if (!result.empty()) { + fillMe->mFirmwareLevel.setValue( getAttrValue( result, + "fwrev" ), 30, __FILE__, __LINE__ ); + } + } + + for (size_t i = 0; i < firmwareAttributesSize && fillMe->mFirmwareVersion.dataValue.empty(); i++) { + result = searchFile(path, firmwareAttributes[i]); + if (!result.empty()) { + fillMe->mFirmwareVersion.setValue( getAttrValue( result, + firmwareAttributes[i]), 30, __FILE__, __LINE__ ); + break; + } + } } string SysFSTreeCollector::resolveClassPath( const string& path )