From 7f57ff160e0ce561c0f2e3e7c6c5ea9879aadcf2 Mon Sep 17 00:00:00 2001
From: lhchin <lenchin@gmail.com>
Date: Fri, 25 Oct 2019 10:47:15 +0800
Subject: [PATCH] Update Controllers.pm
filter out command "lspci -vvv" console error "pcilib: sysfs_read_vpd: read failed: Input/output error ..." for data not relevant for data collection
---
.../Agent/Backend/OS/Generic/Lspci/Controllers.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm b/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm
index fff290ba..56852970 100644
--- a/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm
+++ b/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm
@@ -18,7 +18,7 @@ sub run {
my $pcislot;
my $type;
my $lspci_version;
- my $command = "lspci -vvv";
+ my $command = "lspci -vvv 2>/dev/null";
#We get the current lspci version
`lspci --version` =~ m/lspci\sversion\s(\d+.*)/ ;
@@ -26,7 +26,7 @@ sub run {
$lspci_version = $common->convertVersion($lspci_version,3);
if ($lspci_version >= 224) { #More informations since version 2.2.4
- $command = "lspci -vvv -nn";
+ $command = "lspci -vvv -nn 2>/dev/null";
}
foreach(`$command`){