aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/lspci.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/lspci.c')
-rw-r--r--toys/pending/lspci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/lspci.c b/toys/pending/lspci.c
index b7a6aee4..caa62141 100644
--- a/toys/pending/lspci.c
+++ b/toys/pending/lspci.c
@@ -36,7 +36,7 @@ int do_lspci(struct dirtree *new)
int fd, size;
if ((fd = openat(dirfd, *fields, O_RDONLY)) < 0) continue;
- size = 6 + 2*((toys.optflags & FLAG_e) && (p != toybuf));
+ size = ((toys.optflags & FLAG_e) && (p == toybuf)) ? 8 : 6;
p[read(fd, p, size)] = '\0';
close(fd);
}