guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

14/20: installer: Use "lspci -mm" instead of "lspci -m".


From: John Darrington
Subject: 14/20: installer: Use "lspci -mm" instead of "lspci -m".
Date: Thu, 12 Jan 2017 20:41:04 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit 137c5e6d774f544433ba4068eda507521e2a4c51
Author: John Darrington <address@hidden>
Date:   Tue Jan 10 17:23:41 2017 +0100

    installer: Use "lspci -mm" instead of "lspci -m".
    
    * gnu/system/installer/network.scm (network-page-init): Use the new version 
of
    lspci and thus avoid a cdr.
---
 gnu/system/installer/network.scm |   21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/gnu/system/installer/network.scm b/gnu/system/installer/network.scm
index 1667abc..d07791e 100644
--- a/gnu/system/installer/network.scm
+++ b/gnu/system/installer/network.scm
@@ -171,20 +171,13 @@
                       ((bus device . func)
                        (format #f "~50a ~6a ~a"
                        (car (assoc-ref
-                             (cdr
-                              ;; It seems that lspci always prints an initial
-                              ;; "Device: <bus>:<device>.<func> line.  We are
-                              ;; not interested in this, and it conflicts with
-                              ;; the "real" (descriptive) Device: line which we
-                              ;; want.  Hence the above cdr strips the first 
line
-                              ;; away.
-                              (slurp (format #f "lspci -vm -s~x:~x.~x"
-                                             (string->number bus 10)
-                                             (string->number device 10)
-                                             (if (null? func) 0
-                                                 (string->number func 10)))
-                                     (lambda (x)
-                                       (string-split x #\tab))))
+                             (slurp (format #f "lspci -v -mm -s~x:~x.~x"
+                                            (string->number bus 10)
+                                            (string->number device 10)
+                                            (if (null? func) 0
+                                                (string->number func 10)))
+                                    (lambda (x)
+                                      (string-split x #\tab)))
                              "Device:"))
                        state flags))))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]