From e3a6c4e8a0b0be3694e3f5c660ae661d222a66d7 Mon Sep 17 00:00:00 2001 From: Felix Janda Date: Sat, 27 Jul 2013 09:45:40 +0200 Subject: Fix lspci -e --- toys/pending/lspci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/pending') 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); } -- cgit v1.2.3