aboutsummaryrefslogtreecommitdiff
path: root/toys/other/lspci.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-19 16:42:06 -0600
committerRob Landley <rob@landley.net>2018-11-19 16:42:06 -0600
commit30ebb153fb129bae14c4d2d95e42db9b1a45416d (patch)
tree82a72dc4970d8256f563259d9f255c33043d85be /toys/other/lspci.c
parent3d4219014ae5f5a6553423994ff5ccd1d490a6fc (diff)
downloadtoybox-30ebb153fb129bae14c4d2d95e42db9b1a45416d.tar.gz
A few more GLOBALS() single character argument style conversions.
Diffstat (limited to 'toys/other/lspci.c')
-rw-r--r--toys/other/lspci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/toys/other/lspci.c b/toys/other/lspci.c
index a0671791..c208484d 100644
--- a/toys/other/lspci.c
+++ b/toys/other/lspci.c
@@ -31,8 +31,8 @@ config LSPCI_TEXT
#include "toys.h"
GLOBALS(
- char *ids;
- long numeric;
+ char *i;
+ long n;
FILE *db;
)
@@ -74,7 +74,7 @@ static int do_lspci(struct dirtree *new)
// Lookup/display data from pci.ids?
if (CFG_LSPCI_TEXT && TT.db) {
- if (TT.numeric != 1) {
+ if (TT.n != 1) {
char *s;
fseek(TT.db, 0, SEEK_SET);
@@ -94,7 +94,7 @@ static int do_lspci(struct dirtree *new)
}
}
- if (TT.numeric > 1) {
+ if (TT.n > 1) {
printf((toys.optflags & FLAG_m)
? "%s, \"%s\" \"%s [%s]\" \"%s [%s]\""
: "%s Class %s: %s [%s] %s [%s]",
@@ -119,9 +119,9 @@ driver:
void lspci_main(void)
{
- if (CFG_LSPCI_TEXT && TT.numeric != 1) {
- if (!TT.ids) TT.ids = "/usr/share/misc/pci.ids";
- if (!(TT.db = fopen(TT.ids, "r"))) perror_msg("%s", TT.ids);
+ if (CFG_LSPCI_TEXT && TT.n != 1) {
+ if (!TT.i) TT.i = "/usr/share/misc/pci.ids";
+ if (!(TT.db = fopen(TT.i, "r"))) perror_msg("%s", TT.i);
}
dirtree_read("/sys/bus/pci/devices", do_lspci);