--- toys/other/lspci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
From de97d5bb442cc765128caac5725520d75162e7a6 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <e...@google.com> Date: Thu, 10 Feb 2022 19:08:53 -0800 Subject: [PATCH] lspci: use a different default location for pci.ids on Android.
--- toys/other/lspci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toys/other/lspci.c b/toys/other/lspci.c index 62df47c9..1d3c99ee 100644 --- a/toys/other/lspci.c +++ b/toys/other/lspci.c @@ -20,7 +20,7 @@ config LSPCI_TEXT depends on LSPCI default y help - usage: lspci [-n] [-i FILE ] + usage: lspci [-n] [-i FILE] -n Numeric output (repeat for readable and numeric) -i PCI ID database (default /usr/share/misc/pci.ids) @@ -116,7 +116,8 @@ driver: void lspci_main(void) { if (CFG_LSPCI_TEXT && TT.n != 1) { - if (!TT.i) TT.i = "/usr/share/misc/pci.ids"; + if (!TT.i) TT.i = CFG_TOYBOX_ON_ANDROID ? "/vendor/pci.ids" : + "/usr/share/misc/pci.ids"; if (!(TT.db = fopen(TT.i, "r"))) perror_msg("%s", TT.i); } -- 2.35.0.rc2.247.g8bbb082509-goog
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net