Skip to content

Commit

Permalink
Redirect stderr of lspci invocations to separate files
Browse files Browse the repository at this point in the history
Otherwise executing lspci might spill something like:

  # lspci -vvnn > /dev/null
  pcilib: sysfs_read_vpd: read failed: No such device

Which according to https://bugzilla.kernel.org/show_bug.cgi?id=199467
isn't an "actual" error, but there is just no VPD EEPROM present.
But as long as it shows up on stderr, it behaves like an error, so
let's also tread it like an error. :)

Related to #12
Thanks: Darshaka Pathirana for the bug report
  • Loading branch information
mika committed Aug 2, 2024
1 parent 8293591 commit bbfd3b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grml-hwinfo
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ cd "${OUTDIR}" || exit 1

# disks / devices
[ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi > scsi
exectest lspci && lspci -nn > ./lspci
exectest lspci && lspci -vvnn > ./lspci_verbose
exectest lspci && lspci -nn >./lspci 2>./lspci.error
exectest lspci && lspci -vvnn >./lspci_verbose 2>./lspci_verbose.error
cat /proc/partitions > partitions
find /proc/ide/ -name geometry -exec grep . {} \; > proc_ide 2>/dev/null
df -h > ./df 2>/dev/null
Expand Down

0 comments on commit bbfd3b1

Please sign in to comment.