syscalls: 'all-network-interface-names' accepts non-alphanumeric characters.

This fixes interfaces with a dash or other characters being ignored.
Suggested by Jookia <166291@gmail.com>.

* guix/build/syscalls.scm (%interface-line): Use [[:graph:]] instead
of [[:alnum:]].
This commit is contained in:
Ludovic Courtès 2016-02-03 11:18:57 +01:00
parent 2a5f0db4c4
commit a220b262db

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;;
;;; This file is part of GNU Guix.
@ -625,7 +625,7 @@ (define* (network-interface-names #:optional sock)
(define %interface-line
;; Regexp matching an interface line in Linux's /proc/net/dev.
(make-regexp "^[[:blank:]]*([[:alnum:]]+):.*$"))
(make-regexp "^[[:blank:]]*([[:graph:]]+):.*$"))
(define (all-network-interface-names)
"Return all the names of the registered network interfaces, including those