aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorFelix Janda <felix.janda@posteo.de>2013-07-27 09:45:40 +0200
committerFelix Janda <felix.janda@posteo.de>2013-07-27 09:45:40 +0200
commite3a6c4e8a0b0be3694e3f5c660ae661d222a66d7 (patch)
tree2391a1e60a7f9a7d17ded05f9f1da29ee641dc7e /toys/pending
parent50a0daae792c9586d669aa729752beecbf5d18e7 (diff)
downloadtoybox-e3a6c4e8a0b0be3694e3f5c660ae661d222a66d7.tar.gz
Fix lspci -e
Diffstat (limited to 'toys/pending')
-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);
}