Subject: Re: [PATCH v8 2/7] linux-modules: Add install-modules.

From: Danny Milosavljevic <[email-masked]>
Date: Sat, 3 Mar 2018 16:32:12 +0100

> +          ;; Note: there's only one devname and then only one (char-major|block-major).
> +          (for-each
> +           (match-lambda
> +            (((? (cut string-prefix? "devname:" <>) alias) . value)
> +             (set! devname (string-drop value (string-length "devname:"))))
> +            (((? (cut string-prefix? "char-major-" <>) alias) . value)
> +             (let ((parts (string-tokenize %not-dash)))
> +               (match parts
> +                      ((a b major minor)
> +                       (format port "~a ~a ~a:~a\n" devname "c" major minor)))))
> +            (((? (cut string-prefix? "block-major-" <>) alias) . value)
> +             (let ((parts (string-tokenize %not-dash)))
> +               (match parts
> +                      ((a b major minor)
> +                       (format port "~a ~a ~a:~a\n" devname "b" major minor)))))
> +            (_ #f))
> +           aliases))))))

Probably better to be more careful that devname is set early enough.