]> mj.ucw.cz Git - pciutils.git/commit
dump: Support `lspci -F -` for stdin
authorMartin Mareš <mj@ucw.cz>
Sun, 5 Apr 2026 16:38:32 +0000 (18:38 +0200)
committerMartin Mareš <mj@ucw.cz>
Sun, 5 Apr 2026 16:38:32 +0000 (18:38 +0200)
commitd8862fba3550e57c7d91cd2830b0bf6df6a4192a
tree5454f50f25cb3ef5fec7b7bb5d2de0509bd22373
parent34a7ff32d79d306756ae585720108c976145354b
dump: Support `lspci -F -` for stdin

It can be useful to pipe raw config registers (lspci -x) from one system
to another, so the latter system can do the parsing (lspci -vv -F ...).
For example, one might do this if the former has a more limited / older
version of lspci. Today, one has to write the contents to a file.

Support stdin via "-", so it's easier to run it through a pipeline, such
as:

  ssh ${remote_host} old_lspci -xxx | new_lspci -vv -F -

A dash (-) is a common convention used by many other tools. If one
really expected to access a file named "-", one can use "./-" or similar
to disambiguate.

Based on a patch by Brian Norris <briannorris@chromium.org>.
lib/dump.c
lspci.man